1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00
dotfiles/scripts/vim-setup

30 lines
871 B
Plaintext
Raw Normal View History

2017-12-18 16:53:43 +00:00
#!/bin/sh
set -e
2017-12-18 16:53:43 +00:00
############################
## Check for dependencies ##
############################
error() { >&2 printf "Error: %s" "$1"; exit 1; }
which cmake >/dev/null 2>&1 || error 'cmake is not installed'
which clang >/dev/null 2>&1 || error 'clang is not installed'
which python >/dev/null 2>&1 || error 'python is not installed'
[ -z "$VIMDIR" ] && error '$VIMDIR is not set'
2016-05-21 11:45:23 +00:00
#######################
## Initialise Vundle ##
#######################
2017-12-18 16:53:43 +00:00
mkdir -p "$VIMDIR/bundle" "$VIMDIR/swapfiles"
if [ ! -d "$VIMDIR/bundle/Vundle.vim" ]; then
git clone https://github.com/VundleVim/Vundle.vim.git "$VIMDIR/bundle/Vundle.vim"
fi
2017-07-14 13:15:48 +00:00
vim +PluginUpdate +qall
#########################
## Setup YouCompleteMe ##
#########################
2017-12-18 16:53:43 +00:00
cd "$VIMDIR/bundle/YouCompleteMe"
2016-10-14 21:42:03 +00:00
git submodule update --init --recursive
2017-07-14 13:15:48 +00:00
./install.py --system-libclang --clang-completer