I have the following four types of highlighting in my .vimrc (each one displays a different color):
- incsearch (backlit matches as you search)
- match (current word, a la visual studio editor)
- 2match (trailing spaces at the end of a line)
- hlsearch (regular matches
/ )
The allocation priority seems to be exactly like me above. For instance. incremental search coloring will override any other matching colors if they are in the same character.
I would like to make hlsearch second in priority, so that it redefines the colors match and 2match (if present in the same character).
Is there any way to do this?
For reference, these are the relevant lines in my .vimrc file:
[...] set hlsearch set incsearch [...] function Matches() highlight curword ctermbg=darkgrey cterm=bold gui=bold guibg=darkgrey silent! exe printf('match curword /\V\<%s\>/', escape(expand('<cword>'), '/\')) highlight eolspace ctermbg=red guibg=red 2match eolspace /\s\+$/ endfunction au CursorMoved * exe 'call Matches()' [...]
source share