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