VI Syntax highlighting in CentOS

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.