Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created March 17, 2017 17:32
Show Gist options
  • Select an option

  • Save hoelzro/bfcd6bc08fb0941e85347579404a29dc to your computer and use it in GitHub Desktop.

Select an option

Save hoelzro/bfcd6bc08fb0941e85347579404a29dc to your computer and use it in GitHub Desktop.
function! DumpSynStack()
for id in synstack(line("."), col("."))
echo synIDattr(id, "name")
endfor
endfunction
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
map <F11> :call DumpSynStack()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment