mac
$ brew install vim --with-cscope --with-lua --override-system-vim
安装spf13-vim见下面linux部分。
如果安装macvim,将上面的vim替换为macvim,然后执行 brew linkapps macvim
linux参考:https://www.cnblogs.com/DillGao/p/6268165.html
$ sudo apt-get remove --purge vim$ sudo apt-get autoclean$ sudo apt-get install python-dev python3-dev ruby-dev luajit liblua5.1-dev libluajit-5.1 libperl-dev libncurses5-dev$ sudo rm -rf /usr/local/share/vim$ sudo rm /usr/bin/vim$ sudo mkdir -p /usr/include/lua5.1/include$ sudo cp /usr/include/lua5.1/*.h /usr/include/lua5.1/include/$ cd ~$ git clone --depth 1 https://github.com/vim/vim.git$ cd ~/vim/src$ make distclean$ ./configure --with-features=huge \--enable-largefile \--enable-multibyte \--enable-perlinterp \--enable-rubyinterp \--enable-luainterp \--enable-python3interp \--with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu \--with-luajit \--enable-fail-if-missing \--with-lua-prefix=/usr/include/lua5.1 \--enable-cscope \--enable-gui=auto注意:python3 和 python 同时给定,优先会使用python--enable-pythoninterp \--with-python-config-dir=/usr/lib/python2.7/config \$ make -j8$ sudo make install$ whereis vimvim: /usr/local/bin/vim /usr/share/man/man1/vim.1$ vim --version安装spf13-vim $ sudo apt-get install exuberant-ctags$ curl http://j.mp/spf13-vim3 -L -o - | sh或者$ curl https://raw.githubusercontent.com/spf13/spf13-vim/3.0/bootstrap.sh -L -o - | sh会出现amirh/HTML-AutoCloseTag错误(提示是登陆github),按Ctrl+w,jj跳过这个错误全部安装后$ vim ~/.vimrc.bundles找到amirh,替换为okayliao,保存退出后用下面命令重新安装一遍插件。$ vim +BundleInstall! +BundleClean +q
以前写的:
http://www.cnblogs.com/Bob-wei/p/4952476.html