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

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.