better syntax highlighting id functin

This commit is contained in:
ManjaroOne666 2018-11-23 20:25:08 +00:00
parent a41c581174
commit 120aa4cf4a
1 changed files with 7 additions and 7 deletions

14
vimrc
View File

@ -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