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>
|
nnoremap <space>z= :call IndentFoldTextColumn(0)<CR>
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
function! SyntaxItem() abort "{{{
|
function! <SID>SynStack()"{{{
|
||||||
" get name of syntax item
|
if !exists('*synstack')
|
||||||
|
return
|
||||||
return synIDattr(synID(line('.'),col('.'),1),'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' )
|
endif
|
||||||
endfunction
|
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")') ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' )
|
||||||
nnoremap <space>pp :echom SyntaxItem()<CR>
|
endfunc
|
||||||
|
nmap <space>pp :call <SID>SynStack()<CR>
|
||||||
"}}}
|
"}}}
|
||||||
function! s:Get_env() abort "{{{
|
function! s:Get_env() abort "{{{
|
||||||
" devdocs DD
|
" devdocs DD
|
||||||
|
|
Loading…
Reference in New Issue