Add function to show syntax segments
This commit is contained in:
parent
d0c49138e5
commit
67a54b9297
10
vim/.vimrc
10
vim/.vimrc
|
@ -34,6 +34,16 @@ else
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
endif
|
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
|
" Autocommands
|
||||||
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown
|
autocmd BufEnter ~/.local/share/zk/* set filetype=markdown
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue