vim color matching: Color matching is abnormal in various operating environments
为情所困
为情所困 2017-05-16 16:40:46
0
1
642

The questioner is using xubuntu, apt-get install gvim, which will be used in three situations vim:
* xfce4-terminal
* gvim
* <ctrl><alt><f[num]>

The following is my attempt, but it only distinguishes these three 'situations', and the actual operation is not ideal,
I really don’t understand 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"
endif

A piece of information found Optimized Vimrc with 256 Colorscheme

为情所困
为情所困

reply all(1)
phpcn_u1582

It will be more accurate to judge whether it is a GUI like this:

if has("gui")
  ...
endif

In addition, the terminal type of xfce-terminal can be adjusted, and the default may be xtermxterm-color或者xterm-256color,你需要自己看看,Linux console(就是你所说的<f[num]>)的terminal类型是linux.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template