Last active
July 21, 2019 21:37
-
-
Save jay-johnson/0ea29d3987b33fda0490358ad517503b to your computer and use it in GitHub Desktop.
Unofficial - Install YouCompleteMe with Vim from Source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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