summaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
authortsxv478 <atci39@rambler.ru>2024-04-28 21:03:20 +0300
committertsxv478 <atci39@rambler.ru>2024-04-28 21:03:20 +0300
commit25fc2a381fb65157e81d0dce74fb0e7de7f8afa1 (patch)
tree0fd4ab44057c2e8ebcd74902fdbec9ac29986d46 /nvim
parentde0f0dd32661b64949d0370044cd7dddaad74418 (diff)
Fix vim-plug installation
Diffstat (limited to 'nvim')
-rw-r--r--nvim/init.vim9
1 files changed, 5 insertions, 4 deletions
diff --git a/nvim/init.vim b/nvim/init.vim
index b2f69f1..42e76be 100644
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -1,9 +1,10 @@
let mapleader=","
-if empty(glob('~/.local/share/nvim/site/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
+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
call plug#begin()