VI is no color, vim is a color.
We can look through the Rpm-qa |grep vim to see if the system installed the following 3 rpm package, if there is a vim installed. [Root@betty ~]# Rpm-qa |grep vim
Vim-minimal-7.0.109-7.el5
Vim-enhanced-7.0.109-7.el5
Vim-common-7.0.109-7.el5
If not, download and install the 3 packages.
When the installation is complete, the VIM command is available and is colored, but does not solve the problem of VI no color. We need to fix the problem by modifying the ~/.BASHRC file: [Root@betty ~]# Vi. BASHRC
Add alias vi= ' vim ' in it
So VI has color (because VI became the alias of Vim). If the color is dim, we can set it further.
Find Vim's color directory (may be in position /usr/share/vim72/colors, but different system catalogs may be different, it is recommended to create a. Vim directory in the ~ directory, and then create the corresponding folders and files in some directories). "Hljs vim" >[root@betty ~]# ls/usr/share/vim/vim72/colors/
README.txt darkblue.vim delek.vim elflord.vim koehler.vim murphy.vim peachpuff.vim shine.vim Torte.vim
Blue.vim default.vim desert.vim evening.vim morning.vim pablo.vim ron.vim slate.vim Zellner.vim
Then create a. VIMRC document in your own $HOME directory. [Root@betty ~]# Vi. VIMRC
Add to: ColorScheme evening
If you want to choose a different color scheme, just replace the evening. Then turn on VIM to see if the color is getting prettier.