admin管理员组

文章数量:1122832

In a plaintext buffer I have many words highlighted by :call matchadd(<group>, <pattern>) in different highlight groups. Is there a way to get the group name of cursor char?

:hlID()does not accepts cursor position args, it asks for highlight group name as its arg and returns highlight ID.:synID() accepts cursor position args but it does not work because it is for syntax highlight, not match highlight. And as it is plaintext buffer, :Inspect in neovim gives 'no items found at position x,y in buffer i'.

本文标签: Is there a way to get highlight group of the char under the cursor in (neo)vimStack Overflow