Just a memo for me for setup VIM as IDE
$ cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
◾ Install all the prerequisite libraries
$ yum install gcc make ncurses ncurses-devel
$ yum install ctags git tcl-devel \
ruby ruby-devel \
lua lua-devel \
luajit luajit-devel \
python python-devel \
python3 python3-devel \
perl perl-devel \
perl-ExtUtils-ParseXS \
perl-ExtUtils-XSpp \
perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed
◾ Remove the existing Vim if you have already installed it
$ yum list installed | grep -i vim
$ yum remove vim-enhanced vim-common vim-filesystem
◾ Download Vim source
$ git clone https://github.com/vim/vim.git
$ cd vim
◾ Configure
$ ./configure --with-features=huge \
--enable-multibyte \
--enable-python3interp \
--enable-rubyinterp \
--enable-perlinterp \
--enable-luainterp \
--enable-cscope \
--enable-largefile \
--enable-fail-if-missing \
--prefix=/usr/local/
🏷️ Note:
VIM does NOT support
pythonandpython3at the same time.
UltiSnips.vim has some problem with python, error like below would occur with python
E837: This Vim cannot execute :py3 after using :python
🚩It is recommended to compile vim with python3 support.
You can use below method to check your vim's python enablement:
Enter command mode, type :echo has('python3') or :echo has('python').
If the output is '1', it means supported, else the output is '0'.
◾ Build and install
$ make
$ make install
◾ Check Vim version
$ vim --version | less
check if: +lua +multi_byte +perl +python3 +ruby

◾ Change color scheme of vim
- Enter command mode and input ":terminal"
- Check available color scheme in the system by command
$ ls -l /usr/share/vim/vim*/colors/
- Edit "~/.vimrc" and add below lines
syntax on
colorscheme torte
Note: The
tortehere is the color scheme you choose for update
- Add
lsrelated command to/usr/bin
$ ln -s /usr/local/bin/vim /usr/bin/vim
$ ln -s /usr/local/bin/vimdiff /usr/bin/vimdiff
$ ln -s /usr/local/bin/vimtutor /usr/bin/vimtutor
✔️ Install the dependency, including nodejs, ag
- First, update the local repository to ensure you install the latest versions of Node.js and npm. Type in the following command:
$ sudo yum update- Next, add the NodeSource repository to the system with:
$ curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -- The output will prompt you to use the following command if you want to install Node.js and npm:
$ sudo yum install -y nodejs- Finally, verify the installed software with the commands:
$ node -version
$ npm -version🏷️Reference
- Installing ag on CentOS
Prerequistes
$ sudo yum install -y pcre-devel
$ sudo yum install xz-devel
$ cd /usr/local/src
$ sudo git clone https://github.com/ggreer/the_silver_searcher.git
$ cd the_silver_searcher
$ sudo ./build.sh
$ sudo make install
$ which ag
## Another way to install ag
$ yum install -y the_silver_searcher🏷️Reference
- Clone and install vim config
$ git clone https://github.com/sebdah/vim-ide.git
$ cd vim-ide
$ sudo ./install.sh## https://github.com/neovim/neovim/wiki/Installing-Neovim
$ yum -y install epel-release
$ curl -o /etc/yum.repos.d/dperson-neovim-epel-7.repo https://copr.fedorainfracloud.org/coprs/dperson/neovim/repo/epel-7/dperson-neovim-epel-7.repo
$ yum -y install neovim --enablerepo=epel
The default path of Neovim:
- ~/.vimrc has been replaced with ~/.config/nvim/init.vim. If you install neovim success but this folder does not display, you can create it manually.
- ~/.vim folder has been replaced with ~/.local/share/nvim/site folder.
🏷️ Reference
Add or update the TERM in /etc/proflie and set it to xterm-256color as below
TERM=xterm-256color
export TERM
To make the change take effects, you need to reboot host or source /etc/profile
Besides, please make sure below configuration exists in your ~/.vimrc
set t_Co=256
set background=dark
:echo $MYVIMRC
Note:
:versiontells what locations are searched, but doesn't give any info regarding what files were found. For that the $MYVIMRC variable is useful, as is looking at output of:scriptnamesfor full list of all loaded script files, including all vimrc files
vim ~/.vimrc.localand add below lines
set mouse=v
set clipboard=unnamedplus