Reputation: 13
I'm trying to implement a couple of matches for column highlighting. I have one that highlights columns NEAR the colorcolumn, and a second one that highlights columns PAST the color column. Here's how those two lines look:
set colorcolumn=100
match NearLength /\%<100v.\%>96v/
match OverLength /\%101v.*/
Unofortunately, only the second match line is interpreted. Either will work alone, and if I swap the order whichever one is in the second position will be interpreted while the previous line is not. The colorcolumn is always interpreted correctly
Is what I'm trying to do not possible, or is there just a problem with my implementation?
Upvotes: 0
Views: 81
Reputation: 31429
Use 2match
instead of match
. You can only match 1 thing with match at a time (with match). You can match up to three things by using match
, 2match
and 3match
. Take a look at :h match
Upvotes: 1