vim-settings/vim-sync-append.sh

39 lines
925 B
Bash
Raw Permalink Normal View History

#! /bin/bash
############################
# Vim Settings Setup script by ViViDboarder (Ian)
# http://github.com/ViViDboarder/Vim-Settings
############################
2012-03-29 03:18:33 +00:00
set -ex
2015-03-26 17:09:26 +00:00
2012-03-29 03:18:33 +00:00
# Get current directory for future use in links
VIM_SYNC_DIR=$(dirname "$0")
cd "$VIM_SYNC_DIR"
VIM_SYNC_DIR=$(pwd)
2012-03-29 03:18:33 +00:00
2015-03-27 00:45:03 +00:00
# Vim
[ -d "$HOME/.vim" ] || ln -s "$VIM_SYNC_DIR/vim" "$HOME/.vim"
[ -f "$HOME/.vimrc" ] || ln -s "$VIM_SYNC_DIR/vim/init.vim" "$HOME/.vimrc"
2015-03-27 00:45:03 +00:00
# Neovim
mkdir -p "${XDG_CONFIG_HOME:=$HOME/.config}"
[ -e "$XDG_CONFIG_HOME/nvim" ] || ln -s "$VIM_SYNC_DIR/neovim" "$XDG_CONFIG_HOME/nvim"
2012-07-02 17:25:36 +00:00
# Install all bundles
echo "Install all bundles"
if hash nvim 2>/dev/null; then
2024-09-17 19:58:06 +00:00
# Sync packer plugins
2024-09-17 20:10:27 +00:00
nvim --headless "+Lazy! restore" +qa
2024-09-17 19:58:06 +00:00
# Bootstrap treesitter parsers
2022-03-01 00:38:45 +00:00
nvim --headless -c "lua require('plugins.treesitter').bootstrap()" -c quitall
fi
if hash vim 2>/dev/null; then
2022-03-01 00:38:45 +00:00
vim +PlugInstall +qall
fi
2012-03-29 03:18:33 +00:00
echo "All done!"
exit 0