Auto install vim plug manager if not installed 🔌
This commit is contained in:
parent
1289f11180
commit
07306e2a18
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,14 @@
|
|||
:set encoding=UTF-8
|
||||
:set clipboard+=unnamedplus " Allow nvim to copy/paste from/to the clipboard"
|
||||
|
||||
" Install vim-plug if not already installed
|
||||
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
|
||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||||
silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/
|
||||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim
|
||||
autocmd VimEnter * PlugInstall
|
||||
endif
|
||||
|
||||
" Plugins
|
||||
call plug#begin()
|
||||
Plug 'https://github.com/wakatime/vim-wakatime' " wakatime plugin
|
||||
|
|
Loading…
Reference in a new issue