Vim 8.0
安装Vim 8.0
yum install ncurses-devel
wget https://github.com/vim/vim/archive/master.zip
unzip master.zip
cd vim-master
cd src/
./configure
make
sudo make install
vim
注:make clean仅仅是清除之前编译的可执行文件及配置文件,而make distclean要清除所有生成的文件。
注:编译安装vim8.0,添加python支持 不能同时支持二者
获得python支持,编译时得加入参数
./configure
--with-features=huge --enable-python3interp --enable-pythoninterp
--with-python-config-dir=/usr/lib64/python2.7/config/ --enable-rubyinterp
--enable-luainterp --enable-perlinterp
--with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/ --enable-multibyte
--enable-cscope --prefix=/usr/local/vim/
参数说明如下:
--with-features=huge:支持最大特性
--enable-rubyinterp:打开对ruby编写的插件的支持
--enable-pythoninterp:打开对python编写的插件的支持
--enable-python3interp:打开对python3编写的插件的支持
--enable-luainterp:打开对lua编写的插件的支持
--enable-perlinterp:打开对perl编写的插件的支持
--enable-multibyte:打开多字节支持,可以在Vim中输入中文
--enable-cscope:打开对cscope的支持
--with-python-config-dir=/usr/lib64/python2.7/config 指定python config路径
--with-python-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/ 指定python3 config路径
--prefix=/usr/local/vim:指定将要安装到的路径(自行创建)
对perl组件支持的问题
在编译perl组件支持时,出现如下错误:
/bin/perl -e 'unless ( $] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$_ $_\n" }}' > auto/if_perl.c
/bin/perl /usr/share/perl5/ExtUtils/xsubpp -prototypes -typemap \
/usr/share/perl5/ExtUtils/typemap if_perl.xs >> auto/if_perl.c
Can't open perl script "/usr/share/perl5/ExtUtils/xsubpp": No such file or directory
Makefile:2453: recipe for target 'auto/if_perl.c' failed
make[1]: *** [auto/if_perl.c] Error 2
make[1]: Leaving directory '/home/$usr/vim/src/vim74/src'
Makefile:26: recipe for target 'first' failed
make: *** [first] Error 2
解决:
yum install perl-ExtUtils*
找了下,发现perl5的$lib路径和原先系统的竟然不一样了,在$PELR5/vendor_perl/ExtUtil/中才有连接文件xsubpp。
接着修改了编译的指向路径,接着编译,却报错:
objects/buffer.o: In function `free_buffer':
/home/$usr/vim/src/vim74/src/buffer.c:661: undefined reference to `perl_buf_free'
objects/ex_docmd.o:(.rodata+0x4678): undefined reference to `ex_perl'
objects/ex_docmd.o:(.rodata+0x4690): undefined reference to `ex_perldo'
objects/window.o: In function `win_free':
/home/$usr/vim/src/vim74/src/window.c:4554: undefined reference to `perl_win_free'
objects/main.o: In function `getout':
/home/$usr/vim/src/vim74/src/main.c:1488: undefined reference to `perl_end'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
Makefile:1733: recipe for target 'vim' failed
make[1]: *** [vim] Error 1
make[1]: Leaving directory '/home/$USR/vim/src/vim74/src'
Makefile:26: recipe for target 'first' failed
make: *** [first] Error
检查src/auto/中的if_perl.c文件,发现竟然是空得,生成失败了。
根据makefile或者第一个报错的指引,找到生成if_perl.c的命令,手动生成即可:
/bin/perl -e 'unless ( $] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$_ $_\n" }}' > auto/if_perl.c
/bin/perl /usr/share/perl5/ExtUtils/xsubpp -prototypes -typemap \
/usr/share/perl5/ExtUtils/typemap if_perl.xs >> auto/if_perl.c
注意xsubpp的路径。
如果出现问题请安装python-dev 再执行上面命令
sudo yum install python-dev
sudo yum install python3-dev
sudo yum install libncurses5-dev
确保 vim 支持 python 2/3 脚本

从上图可以看出老夫的 vim 版本是 8.0.49 且支持 python3 脚本但不支持 python2 脚本(截图的倒数第 7,8 行)
如果你的打印结果中没有相关 python 脚本信息,还可以在 vim 中键入命令 :echo has('python') || has('python3'),若结果是 1 则证明是支持的。
若不论是 vim 版本不满足条件或者是不支持 python 脚本,那么就需要从源码编译安装 vim 了,
Vim 8.0的更多相关文章
- Mac OS 上 VIM 8.0 安装体验
VIM 8.0 赶在中秋前发布 The best way to install Vim on Unix is to use the sources. This requires a compiler ...
- Centos 6.5(64位) vim 8.0 安装
转自:https://blog.csdn.net/sdoyuxuan/article/details/78825912 1 先得安装nurses库 yum list | grep "ncur ...
- Vim 8.0 版本安装方法及添加Python支持
利用Git安装 最简单也是最有效的方法 1. 获取Vim仓库: git clone https://github.com/vim/vim.git 2. 升级到最新的版本: cd vim git pul ...
- Installing Vim 8.0 on Ubuntu 16.04 and Linux Mint 18
sudo add-apt-repository ppa:jonathonf/vim sudo apt update sudo apt install vim uninstall sudo apt re ...
- 代码编辑器[0] -> Vim/gVim[0] -> 基于 Python 的 gVim 环境配置(Windows)
环境配置 / Environment Setup 基于Python开发的 gVim 环境配置(Windows) 使用方式参考 Vim 的使用. 1 基于vundle进行配置 Vim有多个扩展管理器, ...
- Linux Vim编辑器使用简单讲解
在Linux中,主要编辑器为vi或者vim,本文围绕vim做简单的讲解说明:Linux默认自带vi(vim)编辑器,其程序包为:[root@linuxidc.com ~]# rpm -qf `whic ...
- PARSEC-3.0编译错误
OS: Ubuntu 14.04 LTS (x86_64) ***error 1 OpenSSL 1.0.1e 与 perl5.18 不兼容 POD document had syntax error ...
- vim深入研究
About VIM--Unix及类Unix系统文本编辑器 Vim是一个类似于Vi的著名的功能强大.高度可定制的文本编辑器,在Vi的基础上改进和增加了很多特性.VIM是纯粹的自由软件. Vim普遍被推崇 ...
- vi/vim使用进阶: vimrc初步
本节所用命令的帮助入口: :help compatible :help mapleader :help map :help autocmd 当vim在启动时,如果没有找到vimrc或gvimrc,它缺 ...
随机推荐
- Linux学习笔记之Linux运行脚本时 $'\r' 错误
1.Windows上操作 用notepad++编译器打开脚本,编辑->文档格式转换->转换为UNIX格式,然后保存. 重新上传.运行,问题解决 2.Linux上操作 用vi/vim命令打开 ...
- ElasticSearch(二)CentOs6.4下安装ElasticSearch
一.准备工作 Elastic 需要 Java 8 环境.如果你的机器还没安装 Java,先需要安装java环境,同时还注意要保证环境变量JAVA_HOME正确设置. 链接:https://pan.ba ...
- 被fancybox坑的心路历程
今天项目中需要使用fancybox来展示图片,但是使用中发现fancybox没起作用,点击图片直接刷新了页面! fancybox的原理是通过给a标签绑定事件,使得a标签不在是直接跳转链接,而是把链接中 ...
- udp编程 实例
server端 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <er ...
- Java利用JNI调用C/C++写成的DLL
前言 由于学期作业的要求,笔者需要开发一个语音识别系统.出于对Java的热爱,笔者非常想用Java来写上层程序(前台+数据库的三层),又要用到Microsoft Speech SDK,所以在这些条件下 ...
- nvgre
GRE RFC2784 工作原理 Structure of a GRE Encapsulated Packet A GRE encapsulated packet has the form: ---- ...
- 20165310 《Java程序设计》课程总结
20165310 <Java程序设计>课程总结 一.每周作业及实验报告博客链接汇总 预备作业一:我期望的师生关系 20165310 我期望的师生关系 预备作业二:学习基础和C语言基础调查 ...
- tf.argmax()以及axis解析
首先,明确一点,tf.argmax可以认为就是np.argmax.tensorflow使用numpy实现的这个API. 简单的说,tf.argmax就是返回最大的那个数值所在的下标. 这个 ...
- QT---实现舒尔特方格(零基础入门)
按照之前说的,加上舒尔特方格,读者还可以自行将此游戏做成APP放到手机上,后面还有贪吃蛇,Java版的飞机大战,五子棋,各类游戏会不断加上来的,当然,会免费附加源代码! 读者可以去4399去玩一下,可 ...
- android 系统 不深度休眠【转】
本文转载自:https://blog.csdn.net/fmc088/article/details/80401405 1.分析解析 android系统有earlysuspend和suspend两种休 ...