Martín Fixman
Martín Fixman

Reputation: 9575

Find which highlighting is being used for a particular string in Vim

I'm trying to debug a syntax file with a few hundred syntax and highlight commands, many of which with the same result.

I want to know which of these are being applied to a particular string to decide how to colour it.

Upvotes: 4

Views: 194

Answers (1)

Martín Fixman
Martín Fixman

Reputation: 9575

I found the solution in Vi Stack Exchange (thanks @mkrieger1 for the link).

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

Upvotes: 5

Related Questions