mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
Support neovim by making the autoload directory dynamic in the autoinstall tip.
parent
81d52eff1e
commit
adb93b802b
6
tips.md
6
tips.md
@ -5,9 +5,9 @@
|
||||
_Place the following code in your .vimrc before `plug#begin()` call_
|
||||
|
||||
```vim
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user