Shorter statusline, without own colours
authorSergey Matveev <stargrave@stargrave.org>
Thu, 28 May 2020 13:15:10 +0000 (16:15 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 28 May 2020 13:43:48 +0000 (16:43 +0300)
vim/.vimrc

index b4f525c4615edabd25cc8c8320a66e5ca2f88014..a3ffbc6179cfe891046c00fcebed9fb4193bfcf2 100644 (file)
@@ -68,16 +68,14 @@ highlight CursorColumn ctermfg=cyan ctermbg=red
 " }}}
 
 " Statusline {{{
-highlight User1 ctermbg=blue ctermfg=black
-highlight User2 ctermbg=green ctermfg=black
-highlight User3 ctermbg=yellow ctermfg=black
-highlight User4 ctermbg=red ctermfg=black
 set laststatus=2
-set statusline=%n\|%F%m%r%h%w%q\ %=
-set statusline+=%1*%Y[%{strlen(&fenc)?&fenc:&enc},%{&ff}]
-set statusline+=%2*[%l/%L]
-set statusline+=%3*[%c%V:0x%B]
-set statusline+=%4*%{LintStatus()}
+set statusline=%F\ %m%r%h%w%q%k\ %=
+set statusline+=%n\ %#Question#%Y
+set statusline+=%#DiffChange#%{strlen(&fenc)?&fenc:&enc}\ %{&ff}
+set statusline+=%#DiffAdd#%l/%L
+set statusline+=%#Todo#%c%V:0x%B
+set statusline+=%#Comment#%o
+set statusline+=%#Error#%{LintStatus()}
 set statusline+=%*\ %P
 
 function! LintStatus() " it is overrided in ftplugins