CentOS VI does not display color processing

Source: Internet
Author: User

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.

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.