I am editing some xml right now and I have been leaving myself some comments of things to come back to. Like this
<!-- Question: bla bla -->
I am editing with vim right now and I would like vim to highlight Question right now so that I can easily look through my code and find all the places I need to look at. I know I need to add something in my vimrc but I think that I might be searching for the wrong thing.
I tried putting this in my
.vimrc but it had no effect:
syn keyword JakeAnnotation Question hi JakeAnnotation gui=bold term=bold cterm=bold
Actually I can see that what I did before had some effect because when I do this:
It shows me all of the things that it is highlighting and one of the entries is:
JakeAnnotation xxx term=bold cterm=bold ctermbg=6
(and the xxx is formatted correctly)
This leads me to beleave that I am just not defining Question properly. Does Question need to be on a line by itself?
Ok so to user 22303's post I have this working:
highlight MyQuestion cterm=bold term=bold ctermbg=blue ctermfg=black match MyQuestion /Question/
However I suspect that you are only allowed to have one match per file. Because when I do this:
highlight MyQuestion cterm=bold term=bold ctermbg=blue ctermfg=black match MyQuestion /Question/ highlight MyRelook cterm=bold term=bold ctermbg=blue ctermfg=black match MyRelook /Another look/
The first one stops working. (But the second one works).