Put dependency install where it belongs
This commit is contained in:
parent
1ba088eac3
commit
3f54411d7b
3 changed files with 6 additions and 10 deletions
1
.config/nvim/init.vim
Normal file
1
.config/nvim/init.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
source ~/.vimrc
|
6
.vimrc
6
.vimrc
|
@ -1,9 +1,3 @@
|
||||||
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
|
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Specify a directory for plugins
|
" Specify a directory for plugins
|
||||||
" - For Neovim: stdpath('data') . '/plugged'
|
" - For Neovim: stdpath('data') . '/plugged'
|
||||||
" - Avoid using standard Vim directory names like 'plugin'
|
" - Avoid using standard Vim directory names like 'plugin'
|
||||||
|
|
|
@ -12,17 +12,18 @@ cp ./.zshrc ~
|
||||||
cp ./.profile ~
|
cp ./.profile ~
|
||||||
cp ./.xprofile ~
|
cp ./.xprofile ~
|
||||||
cp ./.ideavimrc ~
|
cp ./.ideavimrc ~
|
||||||
|
cp ./.vimrc ~
|
||||||
cp ./.gitconfig ~
|
cp ./.gitconfig ~
|
||||||
|
|
||||||
if [ -n "$(command -v vim)" ]; then
|
if [ -n "$(command -v vim)" ]; then
|
||||||
cp ./.vimrc ~
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
vim +PlugInstall +qall
|
vim +PlugInstall +qall
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$(command -v nvim)" ]; then
|
if [ -n "$(command -v nvim)" ]; then
|
||||||
cp ./.vimrc ~
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
mkdir -p $HOME/.config/nvim
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
ln -s ../../.vimrc ~/.config/nvim/init.vim
|
|
||||||
nvim +PlugInstall +qall
|
nvim +PlugInstall +qall
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue