Vim cannot find a color scheme in Ubuntu blackboard

Source: Internet
Author: User

Start vim under Ubuntu, prompting for no color scheme blackboard (or any other),

How do you choose your favorite color scheme? In/usr/share/vim/vim72/colors, (here you select the appropriate folder based on your vim version)

You can see a lot of files, which are the color scheme that comes with vim. For example, we want to set the color scheme to Blue.vim, (this is the most ugly)

ColorScheme Delek

Delek and Koehler These two slightly better spots, other real TM ugly

Then we can open/ETC/VIMRC in CentOS, find ColorScheme Line, change blackboard to Delek Save exit.

The color scheme is set up. We can try a few more options to find one of our favorite ones.

First open vim, enter the command scriptnames to see which scripts vim has loaded

: Scriptnames

All of the syntax and color-related scripts are already loaded and should not be a problem.

Looking at the. VIMRC configuration file

1 set nocompatible        "Vim settings, not Vi settings.  Must is first  2 set autoindent          "Auto align when insert new line, for instance, when using O or O to insert new Li Ne.  3 Set ruler               "Show ruler at the bottom-right of Vim window  4 set showcmd  5 set Backspace=indent,eol,start          "Enable Delete for backspace under Insert mode"  6 ColorScheme darkblue  7 Set number              "Show line number
   
    8 syntax on  9 if &term =~ "Xterm" Ten   If has ("Terminfo") one     set t_co=8     set T_SF=^[[3%P1%DM 13
    set T_SB=^[[4%P1%DM   Else     set t_co=8 set T_SF=^[[3%DM set     t_sb=^[[4%dm   endif endif
   

  

Starting from line 9th, if you use xterm, then do the following color settings, then if the system is not used xterm it? Then look at the shell terminal to enter the following command

Echo $TERM

The results are as follows

vt100+

Sure enough, not xterm, no wonder no color.

Workaround: Open the Shell configuration file,. bash_profile or. BASHRC Join the following line

Term=xterm
Export term

Re-tap Bash, run vim again, color comes! Excited!

Vim cannot find a color scheme in Ubuntu blackboard

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.