Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 857
naught101 Avatar asked Oct 28 '25 04:10

naught101


1 Answers

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.

like image 152
David Pope Avatar answered Oct 30 '25 07:10

David Pope