0

I found this article, How to know which highlighting group is used for the background of a word?

however, it prints out something not what I look for.

It prints out like

VimCommand
VimOption
...

but I look for something like

Normal
ColorColumn
CursorColumn
CursorLine

1 Answers1

1
nnoremap <Leader>nani :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") ."> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>

This does it using synIDtrans. I want to get the color directly as well though

D. Ben Knoble
  • 26,070
  • 3
  • 29
  • 65