madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://"]
  insteadOf = madduck:

WhatHighlight syntax analysis
authormartin f. krafft <>
Thu, 14 Oct 2021 01:41:49 +0000 (14:41 +1300)
committermartin f. krafft <>
Thu, 14 Oct 2021 02:20:07 +0000 (15:20 +1300)

diff --git a/.vimrc b/.vimrc
index 656285a2d85d7954f29609361bc072bd020b8c7b..171bf2523e314477a68400ded97dabdaeae16a5f 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -1490,7 +1490,13 @@ map <Leader>ft :%s,⇝·*,       ,g<CR>:nohlsearch<CR>``
 " replace fake spaces with real ones
 map <Leader>fs :%s,·, ,g<CR>:nohlsearch<CR>``
-map <Leader>sy :echo synIDattr(synID(line("."), col("."), 1), "name")<CR>
+function WhatHighlight()
+  echon 'hi<' . synIDattr(synID(line('.'),col('.'),1),'name') . '> '
+  echon 'trans<' . synIDattr(synID(line('.'),col('.'),0),'name') . '> '
+  echon 'lo<' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)),'name') . '>'
+map <Leader>sy :call WhatHighlight()<CR>
 map <Leader>/ :nohlsearch<CR>