Add :Syntack command to view syntax group stack
This commit is contained in:
parent
9fbe25fee7
commit
bd7dcb738f
@ -28,6 +28,17 @@ function! CloneHighlightGroupWithAttributes(group, new_group, attributes)
|
|||||||
\' term='.a:attributes.' cterm='.a:attributes.' gui='.a:attributes
|
\' term='.a:attributes.' cterm='.a:attributes.' gui='.a:attributes
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! <SID>Synstack()
|
||||||
|
for id in synstack(line('.'), col('.'))
|
||||||
|
let attributes = synIDattr(id, 'name')
|
||||||
|
let attr = synIDattr(id, 'fg')
|
||||||
|
if attr != ''
|
||||||
|
let attributes = attributes.' fg='.attr
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
command Synstack :call <SID>Synstack()
|
||||||
|
|
||||||
" Strip trailing whitespace
|
" Strip trailing whitespace
|
||||||
function! <SID>StripWhitespace()
|
function! <SID>StripWhitespace()
|
||||||
let l = line(".")
|
let l = line(".")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user