better SyntaxItem() functionality
This commit is contained in:
parent
39ecaab069
commit
b12d88ed47
9
vimrc
9
vimrc
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue