naught101
naught101

Reputation: 19573

Vim: View highlight rules acting on current word/character?

Is it possible in vim to see why a particular word is highlighted the way it is? In particular, I have set spell on, and it's got some weird highlighting going on in some situations. This is not limited to spellcheck, obviously.

Upvotes: 4

Views: 1007

Answers (1)

David Pope
David Pope

Reputation: 6637

I have something like this in my status line:

:echo synIDattr(synID(line("."), col("."), 1), "name")

It displays how vim has parsed the syntax for the item under the cursor, which you may be able to use to figure out the source of the highlight.

Upvotes: 8

Related Questions