Skip to content

Instantly share code, notes, and snippets.

@kyleferguson
Created February 10, 2016 22:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyleferguson/e6c152fc7eb1b6cba6a2 to your computer and use it in GitHub Desktop.
Save kyleferguson/e6c152fc7eb1b6cba6a2 to your computer and use it in GitHub Desktop.
Show vim highlighting groups for work under cursor (ctrl-g)
" Show highlighting groups for current word
nmap <c-g> :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment