vim-racket icon indicating copy to clipboard operation
vim-racket copied to clipboard

Highlight FIXME, TODO and XXX also if followed by a colon

Open sschwarzer opened this issue 4 years ago • 0 comments

Thank you for vim-racket! :-)


I would like to see FIXME, TODO and XXX (and maybe NOTE?) to be highlighted even if immediately followed by a colon.

In several other languages, I can type

<comment_character> TODO: some comment

and TODO (without the colon) is highlighted different from the normal comment color.

On the other hand, in vim-racket, writing

; TODO some comment

highlights TODO as expected, but

; TODO: some comment

highlights TODO in the regular comment color.

Since I type the colon without thinking, this means that to get the syntax highlighting for TODO etc. I need to go back and remove the colon, and it still looks as if something is missing. :-)

I guess this syntax highlighting behavior is because FIXME, TODO and XXX are, similar to other language syntax files, defined as keywords (syn keyword racketTodo FIXME TODO XXX contained), but a keyword in Racket includes the colon, so TODO: is no longer detected as introducing a TODO comment, but as its own and different keyword.

sschwarzer avatar Aug 19 '21 22:08 sschwarzer