代码改变世界

Mac 配置 vim

2015-01-23 04:17  Rollen Holt  阅读(805)  评论(0编辑  收藏  举报

Mac 配置 vim

  1. 安装 vim 7.4

     cd ~
     hg clone https://code.google.com/p/vim/
     cd vim
     ./configure --with-features=huge \
                 --enable-multibyte \
                 --enable-rubyinterp \
                 --enable-pythoninterp \
                 --with-python-config-dir=/usr/lib/python2.7/config \
                 --enable-perlinterp \
                 --enable-luainterp \
                 --enable-cscope --prefix=/usr
     make VIMRUNTIMEDIR=/usr/share/vim/vim74
     sudo make install
    

编译的过程中,可能会遇到一些问题。因此需要我们提前将将src目录下的os_unix.h中加上

    #include <AvailabilityMacros.h>
  1. 配置 vim

参考:我的 vim 配置

可能遇到的问题:

ycm_client_support.[so|pyd|dll] and ycm_core.[so|pyd|dll] not detected; you need to compile YCM before using it.

需要到~/.vim/bundle/YouCompleteMe目录下,执行:

./install.sh --clang-completer
  1. 这样应该就 ok 了,如果你的人品不是太差的话。期间缺什么东西,brew install 就好了。