better syntax highlighting id functin
This commit is contained in:
parent
a41c581174
commit
120aa4cf4a
14
vimrc
14
vimrc
|
@ -654,13 +654,13 @@ nnoremap <space>z. :<C-U>call IndentFoldTextColumn(5 * (v:count == 0 ? 1 : v:cou
|
|||
nnoremap <space>z= :call IndentFoldTextColumn(0)<CR>
|
||||
|
||||
"}}}
|
||||
function! SyntaxItem() abort "{{{
|
||||
" get name of syntax item
|
||||
|
||||
return synIDattr(synID(line('.'),col('.'),1),'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' )
|
||||
endfunction
|
||||
nnoremap <space>pp :echom SyntaxItem()<CR>
|
||||
|
||||
function! <SID>SynStack()"{{{
|
||||
if !exists('*synstack')
|
||||
return
|
||||
endif
|
||||
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")') ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' )
|
||||
endfunc
|
||||
nmap <space>pp :call <SID>SynStack()<CR>
|
||||
"}}}
|
||||
function! s:Get_env() abort "{{{
|
||||
" devdocs DD
|
||||
|
|
Loading…
Reference in New Issue