vim环境配置spf13
2015-12-17 14:08
369 查看
1、ncurses安装
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz tar -xf ncurses-5.9.tar.gz cd ncurses-5.9 ./configure make sudo make install
2、lua安装
centOS虽然自带了lua,但是安装的时候有几个文件找不到http://www.lua.org/download.html
#官网的安装说明 curl -R -O http://www.lua.org/ftp/lua-5.3.2.tar.gz tar zxf lua-5.3.2.tar.gz cd lua-5.3.2 #make linux test make linux sudo make install
安装的时候出问题:
error:readline/readline.h:No such file or directory
如果没有安装readline,需要安装
yum install readline
如果已经安装,还有此问题说明,没有安装依赖
yum install readline-devel
3、安装vim
如果之前已经安装了vim,查看是否支持luavim :version #lua 前面是个+号
如果没有,重新安装(无需卸载)
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 tar -xf vim-7.4.tar.bz2 cd vim74 ./configure --with-features=huge --enable-rubyinterp --enable-pythoninterp --enable-luainterp --with-lua-prefix=/usr/local sudo make sudo make install
其中
--with-lua-prefix=/usr/local指的是lua的安装目录
可以将
./configure的输出重定向到一个文件 log
$ cat log | grep lua checking --enable-luainterp argument... yes checking --with-lua-prefix argument... /usr/local checking --with-luajit... no checking for lua... /usr/local/bin/lua checking if lua.h can be found in /usr/local/include... yes checking if link with -L/usr/local/lib -llua is sane... yes
出现上述状况表明可以安装
出现的问题:
objects/if_lua.o: In function `luaV_list_insert': /vim74/src/if_lua.c:777: undefined reference to `luaL_optlong' collect2: error: ld returned 1 exit status
修改文件
vim74/src/if_lua.c
//long pos = luaL_optlong(L,3,0); long pos = (long)luaL_optinteger(L,3,0);
4、将你的vim的路径添加到.bashrc
文件中
$ find vim #如果不确定安装在何处,使用上面的命令找到所有的vim,看他们的:version alias vim=/usr/loacl/bin/vim
5、安装spf13
http://vim.spf13.com/curl https://j.mp/spf13-vim3 -L -o - | sh
注意是
https有时候安装不成功就是因为使用了官网的用的
http
6、自定义的vim设置保存在 .vimrc.local中
相关文章推荐
- VIM编译器显示TAB和TAB转换为空格
- 菜鸟说给菜鸟听之VIM--入门篇(1)
- Centos6 编译安装Python
- 硬盘安装CentOS 6.2以及添加GRUB启动菜单
- CentOS 6.2实战部署Nginx+MySQL+PHP
- cygwin下vim方向键不好用的解决方案
- 安装使用Ubuntu之vim必须知道的细节
- CentOS 7系统配置上的变化解析
- CentOS下DB2数据库安装过程详解
- CentOS 6.3下编译安装Ruby 2.0笔记
- 详解Lua中的表的概念及其相关操作方法
- Ruby学习笔记二帮助生成Vim添加代码头的代码
- Lua编程示例(二):面向对象、metatable对表进行扩展
- 把Lua编译进nginx步骤方法
- Lua脚本自动生成APK包
- Lua中的元表(metatable)、元方法(metamethod)详解
- Lua中的metatable介绍
- Lua中ipair和pair的区别