1

When I open a .c file in vim, and I type TODO inside a comment, it gets highlighted with yellow in vim. Note that this is not specified in my own .vimrc.

However, when I open a .r file, and I use TODO inside a comment, it does not get highlighted. I am trying to figure out how to make it so that TODO gets highlighted in R file as well, but I am not sure how to find the command that highlights TODO in .c files.

2 Answers 2

3

The default R syntax script ($VIMRUNTIME/syntax/r.vim) links rOKeyword, TODO's syntax group, to the Title highlight group.

The default C syntax script ($VIMRUNTIME/syntax/c.vim) links cTodo, TODO's syntax group, to the Todo highlight group.

TODO is not highlighted in R files as in C files because it is not linked to the right highlight group.

I suggest you contact the maintainer and ask him to fix that issue.

1

I wonder if this helps?

VIM: How can i know which highlight rule is being used for a keyword?

Examine the troubling highlight classes, do a grep or ack by the names in the .vim files under /syntax/ directories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.