Skip to content

Instantly share code, notes, and snippets.

@mattsacks
Created December 31, 2011 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattsacks/1544768 to your computer and use it in GitHub Desktop.
Save mattsacks/1544768 to your computer and use it in GitHub Desktop.
Get highlight groups of word under cursor in Vim
function! Syn()
for id in synstack(line("."), col("."))
echo synIDattr(id, "name")
endfor
endfunction
command! -nargs=0 Syn call Syn()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment