Put dependency install where it belongs

This commit is contained in:
Leon Grünewald 2021-03-21 17:18:51 +01:00
parent 1ba088eac3
commit 3f54411d7b
3 changed files with 6 additions and 10 deletions

1
.config/nvim/init.vim Normal file
View file

@ -0,0 +1 @@
source ~/.vimrc

6
.vimrc
View file

@ -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
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'

View file

@ -12,17 +12,18 @@ cp ./.zshrc ~
cp ./.profile ~
cp ./.xprofile ~
cp ./.ideavimrc ~
cp ./.vimrc ~
cp ./.gitconfig ~
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
fi
if [ -n "$(command -v nvim)" ]; then
cp ./.vimrc ~
mkdir -p $HOME/.config/nvim
ln -s ../../.vimrc ~/.config/nvim/init.vim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
nvim +PlugInstall +qall
fi