File pack/other/start/synstack/autoload/synstack.vim changed (mode: 100644) (index 067430c..7f74d0b) |
1 |
1 |
" dumps syntax stack for element under the cursor |
" dumps syntax stack for element under the cursor |
2 |
2 |
function! synstack#SynStack() |
function! synstack#SynStack() |
3 |
|
for id in synstack(line('.'), col('.')) |
|
4 |
|
echo synIDattr(id, 'name') |
|
|
3 |
|
for l:id in synstack(line('.'), col('.')) |
|
4 |
|
let l:linked = synIDtrans(l:id) |
|
5 |
|
if l:linked == l:id |
|
6 |
|
echo synIDattr(l:id, 'name') |
|
7 |
|
else |
|
8 |
|
echo synIDattr(l:id, 'name') '->' synIDattr(l:linked, 'name') |
|
9 |
|
endif |
5 |
10 |
endfor |
endfor |
6 |
11 |
endfunction |
endfunction |