From cbf6334225a37daa7e89cdd9797358acef12e68d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 15 Nov 2012 21:00:19 +0100 Subject: [PATCH] vimrc: Add StatuslineSyntaxGroup(). Useful to debug color schemes but not used by default. --- vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vimrc b/vimrc index 8922942..3f94aef 100644 --- a/vimrc +++ b/vimrc @@ -373,6 +373,16 @@ if has('statusline') endif endfunction + " Return current syntax group in brackets or nothing if there's none. + function! StatuslineSyntaxGroup() + let l:group = synIDattr(synID(line('.'), col('.'), 1), 'name') + if l:group != '' + return '[' . l:group . '] ' + else + return '' + endif + endfunction + set statusline= " on the left set statusline+=%02n " buffer number -- 2.44.1