Hacker News new | ask | show | jobs
by syncontrol 4876 days ago
It doesn't really depend on MacVim, that's just a binary distribution of Vim for Macs that is proven to work.

Vim from Homebrew doesn't work though, something is wrong with the way Homebrew configures/builds Vim (don't know what though).

You can certainly build a Vim from source for Mac and have that work well with YCM, the only question is why would someone go through the trouble of doing so when MacVim does it for you.

Even if you prefer using Vim in the console and don't like the GUI, MacVim.app has a normal Vim binary inside it that you can call.

3 comments

Vim from Homebrew + YouCompleteMe works for me.

* brew install vim

* alias vim="/usr/local/Cellar/vim/7.3.632/bin/vim"

* :BundleInstall 'Valloric/YouCompleteMe'

* Make the ycm_build directory:

    cd ~
    mkdir ycm_build
    cd ycm_build
* brew install cmake

* Run cmake from the ycm_build dir:

    cmake -G "Unix Makefiles" . ~/.vim/bundle/YouCompleteMe/cpp
* make ycm_core

And boom, YouCompleteMe is running for me.

Works amazing. Always had a problem with having to press a button to autocomplete. The cognitive reflection of "okay, I want help completing this word" usually defeats the speed improvement for me.

> It doesn't really depend on MacVim, that's just a binary distribution of Vim for Macs that is proven to work.

Ah okay - the README gave me a very different impression. Either way using the packaged MacVim binary via the mvim script is preferable, for reasons you've elaborated on.

> why would someone go through the trouble of doing so when MacVim does it for you.

Commandline lovers love trouble, are often not found browsing .dmg offerings?

homebrew-built vim worked fine for me. I followed the manual steps.