Get word color under cursor

How to get the color of the word under the cursor?

Work on creating your own color schemes and trying to untie other colors without looking at the source code.

+5
source share
1 answer
:echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "fg") 
  • "fg" foreground color (GUI: color name used to set the color, cterm: color number as a string, term: empty string),
  • "bg" is the background color (for example, with "fg").

More details

+5
source

Source: https://habr.com/ru/post/1236870/


All Articles