Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Unofficial - Install YouCompleteMe with Vim from Source
function install_ycm() {
mkdir -p ~/.vim
if [[ "$(which xcode-select)" != "" ]]; then
# you may need to install packages with: xcode-select --install
echo ""
echo "installing XQuartz"
ruby -e "$(curl -fsSL" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
brew cask install xquartz
echo ""
echo "cloning vim"
git clone ~/.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}" \
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\""
git clone ~/.vim/bundle/YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
echo ""
echo "cloning submodules"
git submodule update --init --recursive
echo ""
echo "starting install"
python3 ./ --clang-completer
cd $curdir
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.