Compile the latest Vim on CentOS 7

2017-05-26|Categories: Linux, Vim|

All info comes from https://gist.github.com/junhsieh/5b63a37510621e4868a05f254038d022

Install all the prerequisite libraries

yum install gcc make ncurses ncurses-devel
yum install ctags git   \
tcl-devel               \
ruby-devel              \
lua-devel               \
luajit-devel            \
python-devel            \
python3-devel           \
perl-devel              \
perl-ExtUtils-ParseXS   \
perl-ExtUtils-XSpp      \
perl-ExtUtils-CBuilder  \
perl-ExtUtils-Embed

Remove the existing Vim if you have already installed it

  1. yum list installed | grep -i vim
  2. yum remove vim-enhanced vim-common vim-filesystem

Note: You DO NOT need to remove vim-minimal because sudo depends on it.

Download Vim source

  1. git clone https://github.com/vim/vim.git
  2. cd vim

Note: It is better to get it from GitHub because you can get all the latest patches from there.

Configure

./configure --with-features=huge  \
--enable-multibyte                \
--enable-rubyinterp               \
--enable-pythoninterp             \
--enable-perlinterp               \
--enable-luainterp

Build

  1. make
  2. make install

Check Vim version

  1. vim --version | less
  2. check there are: +lua +multi_byte +perl +python +ruby

Leave A Comment