系统:Ubuntu 15.04
因为Ubuntu15.04系统自带Vim不支持Lua,所以得自己编译安装。
1.卸载系统自带的vim.
$ sudo apt-get remove vim vim-runtime vim-tiny vim-common vim-gui-common$ sudo apt-get purge vim vim-runtime vim-tiny vim-common vim-gui-common
2.安装依赖文件。
$ sudo apt-get install luajit libluajit-5.1 libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial
3.下载vim代码。
$ cd /tmp$ git clone https://github.com/vim/vim.git
4.编译安装。
$ ./configure –with-features=huge \–enable-cscope \–enable-rubyinterp \–enable-largefile \–disable-netbeans \–enable-pythoninterp \–with-python-config-dir=/usr/lib/python2.7/config \–enable-perlinterp \–enable-luainterp \–with-luajit –enable-fail-if-missing \–with-lua-prefix=/usr \–enable-gui=gnome2 –enable-cscope –prefix=/usr
$ make VIMRUNTIMEDIR=/usr/share/vim/vim74$ sudo make install
更多Vim相关教程见以下内容:
把VIM打造成一个简单实用的IDE http://www.68idc.cn/Linux/2011-06/37032.htm
Vim学习指南 http://www.68idc.cn/Linux/2013-08/89096.htm
快速学会 Vi编辑器 http://www.68idc.cn/Linux/2013-08/88586.htm
强大的Vim 编辑器 http://www.68idc.cn/Linux/2013-07/87544.htm
在CentOS 6.2上搭建Vim开发环境 http://www.68idc.cn/Linux/2013-07/87363.htm
CentOS 5.4 安装高亮Vim编辑工具 http://www.68idc.cn/Linux/2013-06/86508.htm
Vim技巧分享:C语言设置 http://www.68idc.cn/Linux/2012-12/77124.htm
Ubuntu中设置Vim的行号 http://www.68idc.cn/Linux/2012-12/75485.htm
Vim编辑器使用基础教程 http://www.68idc.cn/Linux/2013-05/84031.htm
更多Ubuntu相关信息见Ubuntu 专题页面 http://www.68idc.cn/topicnews.aspx?tid=2
我是在旅行吗?也许是的。