-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvim-sync-append.sh
More file actions
executable file
·38 lines (29 loc) · 925 Bytes
/
vim-sync-append.sh
File metadata and controls
executable file
·38 lines (29 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/bash
############################
# Vim Settings Setup script by ViViDboarder (Ian)
# http://github.com/ViViDboarder/Vim-Settings
############################
set -ex
# Get current directory for future use in links
VIM_SYNC_DIR=$(dirname "$0")
cd "$VIM_SYNC_DIR"
VIM_SYNC_DIR=$(pwd)
# 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"
# Neovim
mkdir -p "${XDG_CONFIG_HOME:=$HOME/.config}"
[ -e "$XDG_CONFIG_HOME/nvim" ] || ln -s "$VIM_SYNC_DIR/neovim" "$XDG_CONFIG_HOME/nvim"
# Install all bundles
echo "Install all bundles"
if hash nvim 2>/dev/null; then
# Sync packer plugins
nvim --headless "+Lazy! restore" +qa
# Bootstrap treesitter parsers
nvim --headless -c "lua require('plugins.treesitter').bootstrap()" -c quitall
fi
if hash vim 2>/dev/null; then
vim +BlinkUpdate +qall
fi
echo "All done!"
exit 0