Thursday, February 14, 2019

Re: how to display current syntax and highlight items

On Tue, Feb 12, 2019 at 11:33:46AM -0500, Marvin Renich wrote:
>I have looked through index.txt (especially g commands), syntax.txt, and
>usr_06.txt, but I could not find any reference to displaying the name of
>the current syntax item and/or highlight item of the character under the
>cursor. I am pretty sure that there was a tip about this on this list
>in the distant past, but cannot find it. Can anyone point me to the
>correct help tag?

Yet another option:

command! WhatHighlight echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: