better SyntaxItem() functionality

This commit is contained in:
ManjaroOne666 2017-09-13 14:25:22 +01:00
parent 39ecaab069
commit b12d88ed47
1 changed files with 8 additions and 1 deletions

9
vimrc
View File

@ -155,6 +155,13 @@ set softtabstop=2
set shiftwidth=0 "use tabstop value
set mouse=a
" rewrapping set to 80
set tw=180
" disable automatic wrapping
set fo=cq
" disable wrapping based on terminal size
set wm=0
set t_Co=8
set t_Sf=<Esc>[3%p1%dm
set t_Sb=<Esc>[4%p1%dm
@ -201,7 +208,7 @@ set undofile
" get name of syntax item
function! SyntaxItem()
return synIDattr(synID(line("."),col("."),1),"name")
return synIDattr(synID(line("."),col("."),1),"name") . " -> " . synIDattr(synIDtrans(synID(line("."),col("."),1)), "name" )
endfunction
nnoremap <leader>p :echom SyntaxItem()<CR>