diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 425c976..43f80b4 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,3 +1,11 @@ +" automatically install vim-plug if it does not exist +" Note: this installs it in the neovim folder, not the vim folder +if empty(glob('~/.vim/autoload/plug.vim')) + silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + " defines plugin directory " Install plugins from vim with :PlugInstall call plug#begin('~/.local/share/nvim/plugged')