From f0c64e25d771790060b39fabf9c146d51ee335a8 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Wed, 24 Feb 2021 23:27:10 -0500 Subject: [PATCH] Update the syntax identifier. I made it now show nested syntax groups in the status line. This will facilitate easier debugging of complex syntax files. --- vim/vimrc.functions | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vim/vimrc.functions b/vim/vimrc.functions index a9cc43d..1adaaea 100644 --- a/vim/vimrc.functions +++ b/vim/vimrc.functions @@ -17,6 +17,12 @@ function! MyFoldText() endfunction function! SyntaxItem() - return synIDattr(synID(line("."),col("."),1),"name") + "return synIDattr(synID(line("."),col("."),1),"name") + let res = [] + for id in synstack(line("."), col(".")) + let res = res + [ synIDattr( id, "name" ) ] + endfor + "return synIDattr(synID(line("."),col("."),1),"name") + return join( res, ":" ) endfunction