Vim Tips Wiki

Use the console colors in gvim

Revision as of 09:49, June 6, 2008 by Luc Hermitte (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
1,614pages on
this wiki
Tip 527 Printable Monobook Previous Next

created August 9, 2003 · complexity basic · author Peter Backes · version 6.0

You might have noticed that gvim uses slightly different colors compared to the console version. If you like the console colors more than the gvim default colors (as I do), you can add the following to your vimrc:

set background=dark
hi SpecialKey guifg=Blue
hi MoreMsg guifg=Green
hi Visual guifg=NONE guibg=NONE
hi Folded ctermbg=4 guibg=Blue
hi FoldColumn ctermbg=7
hi DiffAdd guibg=Blue
hi DiffChange guibg=Magenta
hi DiffDelete guibg=Cyan
hi Normal guifg=Gray guibg=Black
hi Cursor guibg=White
hi lCursor guibg=White
hi Comment guifg=Cyan
hi Constant guifg=Magenta
hi Special guifg=Red
hi Identifier guifg=Cyan
hi Statement guifg=Yellow
hi PreProc guifg=Blue
hi Type guifg=Green
hi Underlined guifg=Blue
hi Todo guifg=Black

There's one little difference: Folded is changed to something better for console *and* gui and FoldColumn is left as is in gvim and changed for console vim to match the gvim version.


For those of you who like the old school VGA console feel, heres a truetype version of the VGA font used by most graphics cards. Make sure you set it to be used at size 17 cos thats the only font size it will work at.

This should be distributed with vim among the other colorschemes. I think the only thing that is missing are the colors of the ruler (when switching colorschemes, the ruler's colors are not updated). Perhaps

hi StatusLine guifg=black guibg=gray

should do the trick.

I think the line "hi Visual guifg=NONE guibg=NONE" was causing my VIM on XP to complain "Warning: terminal cannot highlight"

This changed from 6.2 to 7.0 (Highlighting a line worked in 6.2, it stopped working in 7.0)

Around Wikia's network

Random Wiki