To see the highlight group of the highlighted char/word, I use the mapping below. I picked it somewhere from tips. It works for syntax and for match highlights.
But it shows no highlight group when on misspelled (red) word, althoug highlight is visible on screen. Why ? fu! ShowSyntaxGroup() echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") \ . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") \ ."> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" endfu map <f2> :call ShowSyntaxGroup()<cr> Yakov