From: martin f. krafft Date: Thu, 14 Oct 2021 01:41:49 +0000 (+1300) Subject: WhatHighlight syntax analysis X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/77078b9f629a09eb531c8b8c8206812f70fcaa93?ds=inline;hp=-c WhatHighlight syntax analysis --- 77078b9f629a09eb531c8b8c8206812f70fcaa93 diff --git a/.vimrc b/.vimrc index 656285a..171bf25 100644 --- a/.vimrc +++ b/.vimrc @@ -1490,7 +1490,13 @@ map ft :%s,⇝·*, ,g:nohlsearch`` " replace fake spaces with real ones map fs :%s,·, ,g:nohlsearch`` -map sy :echo synIDattr(synID(line("."), col("."), 1), "name") +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') . '>' +endfunction + +map sy :call WhatHighlight() map / :nohlsearch