From 992d19da56bd6e9f050957c320e84479f31175a7 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 20 Mar 2019 14:06:46 +0100 Subject: [PATCH] add automatic vim plugin manager installation --- .config/nvim/init.vim | 8 ++++++++ 1 file changed, 8 insertions(+) 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')