commit e6ecb5d1d578eacae8518c402ab9e40d167f5eda
parent 85854b5260b82f0053b0427be484b076bf488da6
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 13 Jun 2019 20:31:30 +0200
vim: synstack plugin to identify highlight groups
Former-commit-id: ad883419349a943f0139656eb009869f48e43bfa
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/vim/commands.vimrc b/vim/commands.vimrc
@@ -52,6 +52,14 @@ function! DeleteHiddenBuffers() " Vim with the 'hidden' option
endfor
endfunction
+" Show syntax highlighting groups for word under cursor
+function! SynStack()
+ if !exists("*synstack")
+ return
+ endif
+ echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
+endfunc
+
let g:NetrwIsOpen=0
function! ToggleNetrw()
if g:NetrwIsOpen
diff --git a/vim/map.vimrc b/vim/map.vimrc
@@ -126,3 +126,5 @@ nnoremap <leader>$ m`:%s/ \+$//e<CR>``
nnoremap H :bprevious<CR>
nnoremap L :bnext<CR>
+
+nmap <C-S-P> :call SynStack()<CR>