Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 332
Martín Fixman Avatar asked Aug 31 '25 03:08

Martín Fixman


1 Answers

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

:echo synIDattr(synID(line("."), col("."), 1), "name")
like image 120
Martín Fixman Avatar answered Sep 04 '25 07:09

Martín Fixman