Support neovim by making the autoload directory dynamic in the autoinstall tip.

Jan Edmund Lazo 2021-03-26 07:46:58 -04:00
parent 81d52eff1e
commit adb93b802b

@ -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
```