Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Unofficial - Install YouCompleteMe with Vim from Source
#!/bin/bash
function install_ycm() {
mkdir -p ~/.vim
curdir=$(pwd)
if [[ "$(which xcode-select)" != "" ]]; then
# you may need to install packages with: xcode-select --install
echo ""
echo "installing XQuartz"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
brew cask install xquartz
echo ""
echo "cloning vim"
git clone https://github.com/vim/vim.git ~/.vim/src
cd ~/.vim/src
echo ""
echo "cleaining previous build if found"
make distclean
echo ""
echo "configuring vim"
./configure \
--enable-multibyte \
--enable-perlinterp=dynamic \
--enable-rubyinterp=dynamic \
--enable-pythoninterp=dynamic \
--enable-python3interp=dynamic \
--enable-cscope \
--with-features=huge \
--enable-fontset \
--enable-largefile \
--disable-netbeans \
--with-compiledby="${USER}" \
--enable-fail-if-missing
echo ""
echo "making vim"
make -j8
echo ""
echo "installing vim with sudo"
sudo make install
echo ""
echo "make sure that vi uses the new path in ~/.bashrc: export PATH=\"/usr/local/bin:\$PATH\""
fi
git clone https://github.com/ycm-core/YouCompleteMe ~/.vim/bundle/YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
echo ""
echo "cloning submodules"
git submodule update --init --recursive
echo ""
echo "starting install"
python3 ./install.py --clang-completer
cd $curdir
}
install_ycm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.