Skip to content
Browse files

Print highlighting scope at the current position.

  • Loading branch information...
1 parent 459ddfd commit 955d916b63406c6bc69fd2d8e3a331ca474d5b35 @aalin committed Jan 31, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 vimrc
View
6 vimrc
@@ -85,3 +85,9 @@ autocmd BufNewFile,BufRead * match trailing_spaces /\s\+$/
highlight StatusLine ctermfg=250 ctermbg=black
highlight StatusLineNC ctermfg=241 ctermbg=black
+
+" Print highlighting scope at the current position.
+" http://vim.wikia.com/wiki/Identify_the_syntax_highlighting_group_used_at_the_cursor
+map <leader>S :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
+\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
+\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>

0 comments on commit 955d916

Please sign in to comment.
Something went wrong with that request. Please try again.