Vim tip 99.
authorIain Patterson <me@iain.cx>
Tue, 19 Aug 2008 15:57:19 +0000 (15:57 +0000)
committerIain Patterson <me@iain.cx>
Tue, 19 Aug 2008 15:57:19 +0000 (15:57 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@136 6be0d1a5-5cfe-0310-89b6-964be062b18b

.vimrc

diff --git a/.vimrc b/.vimrc
index bfb7e9a..2b6167a 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -256,6 +256,9 @@ call Mapping("/", ":let @/=\"\"<CR>:<CR>")
 " Forget the Ex mode mapping.
 map Q <NOP>
 
 " Forget the Ex mode mapping.
 map Q <NOP>
 
+" Vim tip 99: What's the highlighting group under the cursor?
+call Mapping("h", ":echo \"hi<\" . synIDattr(synID(line(\".\"),col(\".\"),1),\"name\") . '> trans<' . synIDattr(synID(line(\".\"),col(\".\"),0),\"name\") . \"> lo<\" . synIDattr(synIDtrans(synID(line(\".\"),col(\".\"),1)),\"name\") . \">\"<CR>")
+
 endif
 
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 endif
 
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""