Kartik Chauhan
Kartik Chauhan

Reputation: 3068

Why is TODO always highlighted in vim?

I was going through a bash file and I noticed that TODO was written twice in the file, and both the instances were highlighted. Why's this? Is it because TODOs are very significant and might avert wastage of time for developers? What's the history behind this?

Upvotes: 1

Views: 649

Answers (1)

Matt
Matt

Reputation: 15186

This is just a syntax element which may be defined (or not) for this particular buffer.

Typically syntax is defined in $VIMRUNTIME/syntax/[filetype].vim. The relevant command could look like this, for example:

syn keyword cTodo contained TODO FIXME XXX

Whether such definition is useful or not is subjective, I admit.

You can see all syntax elements defined for the current buffer with :syntax command.

Upvotes: 2

Related Questions