-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·31 lines (23 loc) · 949 Bytes
/
install.sh
File metadata and controls
executable file
·31 lines (23 loc) · 949 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
#!/bin/bash
set -e
if [[ -z "$1" || "$1" != "light" && "$1" != "full" ]]; then
echo "USAGE: ./install.sh [light|full]"
echo "Installs Vim-Plug and selects the plug-in profile to use."
exit 1
fi
echo "$1" > ~/.vim/profile
mkdir -p ~/.config ~/.local/share/nvim/swap ~/.local/share/nvim/backup ~/.local/share/nvim/undo
(cd ~/.config && ln -s ../.vim nvim)
# This won't exist if we didn't do a --recursive clone
if [ ! -d "$HOME/.vim/.vim-plug/.git" ]; then
git submodule init
git submodule update
fi
# Download & compile YCM
if [[ "$1" == "full" && ! -d "$HOME/.vim/bundle/YouCompleteMe" ]]; then
git clone --recursive https://github.com/Valloric/YouCompleteMe.git "$HOME/.vim/bundle/YouCompleteMe"
"$HOME/.vim/bundle/YouCompleteMe/install.sh" --clang-completer --system-libclang
echo "Please install app-vim/automatictexplugin for full LaTeX support."
fi
# Actually install the plugins
nvim +:PlugInstall +:qa