Yakov Lerner wrote:
> 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>
The synID() function only works for syntax items. You can't use it to
get match or spell highlighting.
--
Another bucket of what can only be described as human ordure hits ARTHUR.
ARTHUR: ... Right! (to the KNIGHTS) That settles it!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///