Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

add hilight group under cursor to statusline

  • Loading branch information...
commit ce89cd0383bacf4cbbc938e2b7b4bc0ad2ba5c40 1 parent 85acb68
@scrooloose authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 vimrc
10 vimrc
@@ -25,12 +25,22 @@ set statusline+=%h "help file flag
set statusline+=%m "modified flag
set statusline+=%r "read only flag
set statusline+=%y "filetype
+set statusline+=[%{StatuslineCurrentHighlight()}]
set statusline+=%= "left/right separator
set statusline+=%c, "cursor column
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %P "percent through file
set laststatus=2
+"return the syntax highlight group under the cursor or "none"
+function! StatuslineCurrentHighlight()
+ let name = synIDattr(synID(line('.'),col('.'),1),'name')
+ if name == ""
+ let name = "none"
+ endif
+ return name
"indent settings
set shiftwidth=4
set softtabstop=4
Please sign in to comment.
Something went wrong with that request. Please try again.