VI Syntax-assisted function
On the issue of VI color, the Internet to find a number of articles just to finish, their own summary.
The VI in CentOS only installs the vim-minimal-7.x by default. So whether the input VI or VIM to view the file, the syntax function can not be enabled normally. It is therefore necessary to install the other two components with Yum: vim-common-7.x and vim-enhanced-7.x.
The command line is typed: yum-y install vim-enhanced, Yum automatically installs the two components. Then it can be in vim: Syntaxon can be effective.
But this is still inconvenient, now only use Vim will be "brilliant", with VI or a "whiteboard."
So, find/ETC/BASHRC, add alias vi= ' Vim ' (to vim from the individual named VI ...) ;
Edit/ETC/VIMRC (Vim's configuration file) and add a sentence of Syntaxon. (Default is available)
If you want VI to display the number of rows, you can also add set Nu.
Want to use in VI to determine the location using the mouse, with set mouse=a. Here you can play according to your personal preferences.
Then SOURCE/ETC/BASHRC, and then use VI to view, you can see the color of the VI interface.
Turn from: http://hi.baidu.com/kemp86/blog/item/2ae7f9df16ac0cd48d1029dd.html