From 77078b9f629a09eb531c8b8c8206812f70fcaa93 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 14 Oct 2021 14:41:49 +1300 Subject: [PATCH] WhatHighlight syntax analysis --- .vimrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.5