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