Setting up multiple highlight rules in vim
Posted
by
ICR
on Super User
See other posts from Super User
or by ICR
Published on 2010-11-17T16:03:32Z
Indexed on
2012/12/15
5:11 UTC
Read the original article
Hit count: 165
vim
|highlighting
I am trying to set up rules to highlight both trailing whitespace and lines which are over a certain length by adding this to my .vimrc:
highlight ExtraWhitespace ctermbg=lightgray guibg=lightgray
match ExtraWhitespace /\s\+$/
highlight OverLength ctermbg=lightgray guibg=lightgray
match OverLength /\%>80v.\+/
However, it only seems to pick up whichever is last. I can't find a way to get them to both work simultaneously.
© Super User or respective owner