vim支持lua
1. ncurses 安装
官网下载:http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
CSDN 下载:http://download.csdn.net/detail/spch2008/8828779
tar -xf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure
make
sudo make install
2. lua 安装
官方网下载:http://www.lua.org/download.html
CSDN 下载:http://download.csdn.net/detail/spch2008/8828787
tar -xf lua-5.3.1.tar.gz
cd lua-5.3.1
make linux
sudo make install
问题一:
error: readline/readline.h: No such file or directory
下载readline
CSDN下载:http://download.csdn.net/detail/spch2008/8828777
cd readline-5.2
./configure
sudo make
sudo make install
问题二:
//usr/local/lib/libreadline.so: undefined reference to `tputs'
//usr/local/lib/libreadline.so: undefined reference to `tgoto'
//usr/local/lib/libreadline.so: undefined reference to `tgetflag'
//usr/local/lib/libreadline.so: undefined reference to `UP'
//usr/local/lib/libreadline.so: undefined reference to `tgetent'
//usr/local/lib/libreadline.so: undefined reference to `tgetnum'
//usr/local/lib/libreadline.so: undefined reference to `PC'
//usr/local/lib/libreadline.so: undefined reference to `tgetstr'
//usr/local/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
添加 -lncurses 参数
/home/spch2008/lua-5.3.1/src/Makefile
linux:
110 $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"
3. vim 安装
官方下载:ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
CSDN下载:http://download.csdn.net/detail/spch2008/8828773
tar -xf vim-7.4.tar.bz2
cd vim74
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp --enable-luainterp --with-lua-prefix=/usr/localsudo makesudo make install
可以将输出重定向到log文件中,查看configure输出:
cat log | grep lua
spch2008@ubuntu:~/vim74$ 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':
/home/spch2008/vim74/src/if_lua.c:777: undefined reference to `luaL_optlong'
collect2: error: ld returned 1 exit status
修改文件 /home/spch2008/vim74/src/if_lua.c
//long pos = luaL_optlong(L, 3, 0);
long pos = (long)luaL_optinteger(L, 3, 0);
4. 安装成功,检测时间,可能遇到问题
打开vim,输入:version, 查看vim编译时间,如果是本次编译生成,则说明正确,然后查看是否有+lua。
若编译时间不正确,则删除旧vim,拷贝新的vim程序
sudo rm -f /usr/bin/vim
sudo rm -f /usr/local/bin
sudo cp ~/vim74/src/vim /usr/bin
sudo cp ~/vim74/src/vim /usr/local/bin
vim支持lua的更多相关文章
- Ubuntu中vim添加lua支持
系统:Ubuntu 15.10/16.04 因为Ubuntu15.10系统自带vim不支持lua,所以得自己编译安装. $ sudo apt install vim-nox vim-nox可以让vim ...
- nginx编译安装支持lua脚本
一.准备编译环境 1.操作系统:CentOS7.6 2.安装编译所需安装包 yum install gcc pcre pcre-devel zlib zlib-devel openssl openss ...
- vim 支持 markdown 语法
/************************************************************************* * vim 支持 markdown 语法 * 说明 ...
- 设置vim支持gbk
linux下的默认字符集是utf-8,但Windows下默认是GBK,如果我们在linux下打开Windows中的文件就很容乱码,可以通过下面的设置使vim支持GBK编码. 首先,确认你的系统中安装了 ...
- 开源抓包工具PowerSniff(支持lua,c语言作为脚本实时分析)
做这个程序的意图是wireshark插件编写复杂(虽然也支持lua),而轻量级的工具如smartsniff,minisniff不支持插件化数据分析,各种工具用下来或多或少不顺手.以前写的外挂也都是手工 ...
- centos编译安装vim并支持lua
系统环境:centos6.5 x86 (basic server) 1.安装编译环境. # yum groupinstall "Development Tools" 2.安装vim ...
- compile vim with lua & python support
vim在macosx 10.9默认没有带lua和python支持,因为装的有些插件是lua写的,有些是python写的,运行不起来,于是决定自己编译一个,下载vim源码,执行以下命令就可以编译vim: ...
- 让VIM支持Python2 by update-alternatives
前言 Ubuntu 16+中$ sudo apt install vim所安装的vim只支持Python3,但很多插件如YCM和powerline均需要Python2,那就来场"生命贵在折 ...
- Sublime Text 3安装完美的Vim支持,ActualVim/NeoVim
很多IDE和编辑器都有Vim插件用于支持Vim模式,但大多数都有些问题,拿我一直用的Idea来说,它的vim在ctrl+v后,选择多行的行前插入,如果这几行中有空行,它不会把空格算在内,所以最终是会少 ...
随机推荐
- php页面输出时,js设置input框的选中值
/* 设置表单的值 */ function setValue(name, value) { var first = name.substr(0, 1), input, i = 0, val; if ( ...
- Docker on CentOS for beginners
Introduction The article will introduce Docker on CentOS. Key concepts Docker Docker is the world's ...
- Win7下安装依赖lxml的python插件
博主python菜鸟,本想在win7下安装一个pyquery玩玩爬虫,折腾了好几天终于搞好了,发现python这坑不是一般的深啊. 有一部分没有截图,请谅解 python版本3.4 1.下载easy_ ...
- 正态QQ图的原理
code{white-space: pre;} pre:not([class]) { background-color: white; }if (window.hljs && docu ...
- Python迭代器:捕获Generator的返回值
但是用for循环调用generator时,发现拿不到generator的return语句的返回值.如果想要拿到返回值,必须捕获StopIteration错误,返回值包含在StopIteration的v ...
- WPF下递归生成树形数据绑定到TreeView上
最终效果图:(用于学习类的效果 图片丑了点,看官莫怪) 新建窗体 然后在前端适当位置插入如下代码: <TreeView x:Name="> <TreeView.ItemTe ...
- GridControl列自动匹配宽度
//自动调整所有字段宽度this.gridView1.BestFitColumns(); //调整某列字段宽度this.gridView1.Columns[n].BestFit(); 大多是网上零散找 ...
- python多线程ssh爆破
python多线程ssh爆破 Python 0x01.About 爆弱口令时候写的一个python小脚本,主要功能是实现使用字典多线程爆破ssh,支持ip表导入,字典数据导入. 主要使用到的是pyth ...
- R语言学习笔记:小试R环境
买了三本R语言的书,同时使用来学习R语言,粗略翻下来感觉第一本最好: <R语言编程艺术>The Art of R Programming <R语言初学者使用>A Beginne ...
- [leetcode] Number of Islands
Number of Islands Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. ...