Add a handy func for vim syntax stack
This commit is contained in:
parent
c7780308ec
commit
527cdfa217
8
vimrc
8
vimrc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user