Vim Color Matching: Abnormal Color Matching in Various Operating Environments

  question, vim

The questioner is using it.xubuntu,apt-get install gvim, is used in three situationsvim:

The following is my attempt, but it only distinguishes these three’ situations’, and the actual operation is not ideal.
I really don’t know much about its color matching.

if &term == "xterm"
 set t_Co=256
 colorscheme lucius
 set background=dark
 elseif &term == "builtin_gui"
 set guioptions=
 colorscheme lucius
 set background=dark
 hi cursor guibg=#DB35EB
 elseif &term == "linux"

A piece of information foundOptimized Vimrc with 256 Colorscheme

It is more accurate to judge whether it is GUI.

if has("gui")

In addition, the terminal type of xfce-terminal can be adjusted, and the default may bextermxterm-colorOr ..xterm-256colorYou need to look at it yourself, Linux console<f[num]>)的terminal类型是linux