Install the Vim 8.0 and YouCompleteMe with Make on CentOS 7.3
2 min readMar 19, 2018
As a vimmer, I want to complete and install the Vim 7.4.1578+ at ~/.local , so that I can use the YouCompleteMe plugin on CentOS 7.3.
Install the Vim 8.0 with Make
- Install the necessary package.
$ sudo yum install gcc-c++ ncurses-devel python-devel
2. Get the source code of Vim.
$ git clone https://github.com/vim/vim.git
3. Go to build directory.
$ cd vim/src && git checkout v8.0.1522# Use the version like my MacVim.
4. Configure it !
$ ./configure \
--disable-nls \
--enable-cscope \
--enable-gui=no \
--enable-multibyte \
--enable-pythoninterp \
--enable-rubyinterp \
--prefix=/home/jonny/.local/vim \
--with-features=huge \
--with-python-config-dir=/usr/lib/python2.7/config \
--with-tlib=ncurses \
--without-x
--prefix
: For local user, not effect other users.--with-python-config-dir
: For support the YouCompleteMe plugin.- I remove
--enable-perlinterp
args, because it will build fail, and I don’t need write the perl script.
5. Compile and install the Vim.
$ make && make install
6. Add ~/.local/vim/bin/ into $PATH.
$ vim ~/.bashrc
...if [ -d "$HOME/.local/vim/bin/" ] ; then
PATH="$HOME/.local/vim/bin/:$PATH"
fi
7. Reload the bashrc.
source ~/.bashrc
Install the YouCompleteMe plugin
- Install the necessary package.
$ sudo yum install gcc-c++ cmake python-devel
2. Get the YouCompleteMe plugin.
$ mkdir ~/.vim/bundle && \
git clone https://github.com/Valloric/YouCompleteMe.git \
~/.vim/bundle/YouCompleteMe
3. Compile and install the YouCompleteMe.
$ cd ~/.vim/bundle/YouCompleteMe && python ./install.py
Enjoy it.
By the way, I use the dein.vim to manage my vim plugins, you can see more detail at https://github.com/chusiang/vimrc .