Permalink
Browse files

Create show-syntax-group plugin.

  • Loading branch information...
1 parent 794404a commit 335dc9938b155828fdba5af4c7793731a48a40c0 @nelstrom committed Jan 21, 2012
Showing with 9 additions and 11 deletions.
  1. +9 −0 vim/plugin/show-syntax-group.vim
  2. +0 −11 vimrc
@@ -0,0 +1,9 @@
+" Show syntax highlighting groups for word under cursor
+" Tip: http://stackoverflow.com/questions/1467438
+nmap <Leader>m :call <SID>SynStack()<CR>
+function! <SID>SynStack()
+ if !exists("*synstack")
+ return
+ endif
+ echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
+endfunc
View
11 vimrc
@@ -125,17 +125,6 @@ nnoremap <expr> gV "`[".getregtype(v:register)[0]."`]"
" Substitute command repetition {{{2
nnoremap & :&&<Enter>
xnoremap & :&&<Enter>
-" Custom commands and functions {{{1
-" Show syntax highlighting groups for word under cursor {{{2
-" Tip: http://stackoverflow.com/questions/1467438/find-out-to-which-highlight-group-a-particular-keyword-symbol-belongs-in-vim
-nmap <Leader>m :call <SID>SynStack()<CR>
-function! <SID>SynStack()
- if !exists("*synstack")
- return
- endif
- echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
-endfunc
-
" Status line {{{1
" Good article on setting a statusline:

0 comments on commit 335dc99

Please sign in to comment.