Add function to show syntax segments

This commit is contained in:
The Magician 2024-07-26 13:19:34 +01:00
parent d0c49138e5
commit 67a54b9297
1 changed files with 10 additions and 0 deletions

View File

@ -34,6 +34,16 @@ else
set shiftwidth=4
endif
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
" a little more informative version of the above
nmap <C-P> :call <SID>SynStack()<CR>
" Autocommands
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown