New answers tagged

0

Your code isn't far off at all. The problem is that your end marker is a newline followed by two characters which aren't /, and this doesn't appear in your file anywhere! One fix would be to end instead on any line that is empty or that starts (after whitespace) with any non-/ character: syntax region NoteRegion start=#//\s*NOTE#hs=s+2 end=#^\s*\($\|[^/\t ]\)...


0

I think this will do what you want, except that the highlighting includes the initial //. I don't know any way to do that; adding /s+2 to the end of the search pattern positions the cursor on the 3rd character: /\/\/\s\+NOTE.*\n\(\/\/\s\+.*\n\)\+ But running a preliminary :global command will produce the highlighting you want, thus: :%g@//\s\+NOTE@/\s\+NOTE....


Top 50 recent answers are included