Add a handy func for vim syntax stack

This commit is contained in:
Dan Buch 2021-07-07 10:02:22 -04:00
parent c7780308ec
commit 527cdfa217
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

8
vimrc
View File

@ -68,3 +68,11 @@ packadd! dracula
colorscheme dracula
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
nmap <leader>sp :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc