0

Is there a way to figure out which color-group a piece of code belongs to? I'm struggling to get my colorscheme to work nicely with various filetypes. It would be handy to have a command that prints out the current color-group for the text at the current cursor position.

for example ([X] marks the cursor position:

def foobar
  @some[X]thing = "foo"
end

would print out "Identifier" (If I'm right about that one ;-)) Is anything like that possible? Or do you have any other recommendation how to "solve" the problem of identifying the right color groups to use?

Pascal
  • 5,879
  • 2
  • 22
  • 34

1 Answers1

1

See here: Find out to which highlight-group a particular keyword/symbol belongs in vim

In addition, there's even a ready-to-use plugin for that: SyntaxAttr.vim

Community
  • 1
  • 1
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324