-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-vim
More file actions
executable file
·37 lines (29 loc) · 1.41 KB
/
Copy pathsetup-vim
File metadata and controls
executable file
·37 lines (29 loc) · 1.41 KB
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
#!/usr/bin/env bash
# ------------------------------------------------------------------------------
# Environment Setup
# ------------------------------------------------------------------------------
VIM_CONFIG_DIR="$XDG_CONFIG_HOME/vim"
VIM_AUTOLOAD_DIR="$VIM_CONFIG_DIR/autoload"
VIM_SPELL_DIR="$VIM_CONFIG_DIR/spell"
PLUG_FILE="$VIM_AUTOLOAD_DIR/plug.vim"
SPELL_URL="https://ftp.nluug.nl/pub/vim/runtime/spell"
# ------------------------------------------------------------------------------
# Install English spell files
# ------------------------------------------------------------------------------
mkdir -p "$VIM_SPELL_DIR"
curl -fSsLo "$VIM_SPELL_DIR/en.utf-8.spl" "$SPELL_URL/en.utf-8.spl"
curl -fSsLo "$VIM_SPELL_DIR/en.utf-8.sug" "$SPELL_URL/en.utf-8.sug"
# ------------------------------------------------------------------------------
# Install vim-plug if not already installed
# ------------------------------------------------------------------------------
if [ ! -f "$PLUG_FILE" ]; then
mkdir -p ~/.config/vim/autoload
echo "Downloading vim-plug..."
curl -fSsLo "$PLUG_FILE" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
# ------------------------------------------------------------------------------
# Install plugins with vim-plug
# ------------------------------------------------------------------------------
echo "Installing Vim plugins..."
vim +PlugInstall +qall
echo "Done."