mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
add SynStack function for investigating highlighting
This commit is contained in:
parent
d3d0f54b1c
commit
1797c9e040
1 changed files with 12 additions and 0 deletions
12
home/vimrc
12
home/vimrc
|
@ -372,6 +372,18 @@ vn <silent> & :call GlobalReplace()<cr>
|
|||
" alias :W to :w, via https://stackoverflow.com/a/3879737
|
||||
cnoreabbrev <expr> W ((getcmdtype() is# ':' && getcmdline() is# 'W')?('w'):('W'))
|
||||
|
||||
" https://stackoverflow.com/a/58244921
|
||||
fu! SynStack()
|
||||
for i1 in synstack(line("."), col("."))
|
||||
let i2 = synIDtrans(i1)
|
||||
let n1 = synIDattr(i1, "name")
|
||||
let n2 = synIDattr(i2, "name")
|
||||
echo n1 "->" n2
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
map gm :call SynStack()<CR>
|
||||
|
||||
" misc {{{1
|
||||
|
||||
set list listchars=tab:»·,trail:·,extends:…,nbsp:‗
|
||||
|
|
Loading…
Add table
Reference in a new issue