Take a look at CSApprox - very good at matching colourschemes (in linux at least - in OSX the default terminal does not have enough colours)
Fairly simple to set up - just configure how many colours are usable by your terminal and put the needed information in your .vimrc
The highlight of error messages is determined by the Error and/or ErrorMsg highlight groups. I'm not sure which one you're seeing, so you might as well disable both. You can see how each group is defined by executing, e.g.,
:hi Error
which will show you, in color, a line like this:
Error xxx term=reverse cterm=bold ctermfg=7 ctermbg=1 guifg=White guibg=Red
The easiest way to clear those settings is to execute
:hi Error NONE
:hi ErrorMsg NONE
If you never set any colorschemes, I think you can just put those commands in your ~/.vimrc, after any :filetype
, :syn
or :colorscheme
commands. If you change color schemes, you will need to do something like using autocommands to make sure those highlight groups are always clear, e.g.,
au ColorScheme * hi Error NONE
au ColorScheme * hi ErrorMsg NONE
au GuiEnter * hi Error NONE
au GuiEnter * hi ErrorMsg NONE
The GuiEnter autocommands account for the behavior of Vim when invoked as gvim, which is to defer some color setting until after ~/.vimrc is read and the GUI is brought up.
Best Answer
There are two abstractions for syntax coloring in Vim. First, the syntax plugin provides definitions for the various syntax elements (e.g. an HTML tag name ->
htmlTagName
), and links them to generic highlight groups (e.g.Statement
). A colorscheme then provides the actual attributes and colors for those (which can depend on whether you use GVIM or a terminal).If you don't like the color / formatting of a particular highlight group, you'd basically create your own customized fork of the colorscheme. Copy the existing
colors/schemename.vim
to~/.vim/colors/newscheme.vim
, and use the new name in your.vimrc
via the:colorscheme newscheme
command.On the other hand, if you're fine with the general colors, and just think that a particular syntax element should use a different group, you can override the default assignment. In this example: