I have installed syntastic on VIM to help me show errors in PHP code however with the current colorscheme/setting I have to following colors:
As you can see it's very hard to read, I wonder if there is a way to change the color if this error window specifically.
If this is only for the current selected item in the quickfix window, that's the Search
highlight group on top of the normal quickfix highlighting. You then have to change either one; the Search
group will affect search results in other windows, too.
If this is other / special Syntastic highlighting, you best look through all groups in the :hi
output to find the bad one.
Unless you want to completely switch your colorscheme, you can adapt individual highlight groups via :highlight
commands after the :colorscheme
command in your ~/.vimrc
. Either :hi link
to another predefined group, or provide your own ctermfg=... guifg=...
etc. color definitions, as described by :help highlight-args
.
Syntastic doesn't change (nor cares about) highlighting of the error window. It's a plain quickfix
window, with filetype qf
. Looking at syntax/qf.vim
, the default highlighting is this:
syn match qfFileName "^[^|]*" nextgroup=qfSeparator
syn match qfSeparator "|" nextgroup=qfLineNr contained
syn match qfLineNr "[^|]*" contained contains=qfError
syn match qfError "error" contained
hi def link qfFileName Directory
hi def link qfLineNr LineNr
hi def link qfError Error
Thus, if you see the quickfix
window in different colours than the main text, it's because your colour scheme has specifically intended it to look that way. You can override highlighting for qfFileName
, qfSeparator
, qfLineNr
, and qfError
to make it more readable, but the better solution IMO would be to use a less broken colour scheme.
Edit: Vim 8.0.641 and later has QuickFixLine
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With