From 9c7229a57ef58f520498caf423da27bbf3bfbef4 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Thu, 15 Mar 2018 16:19:18 +0000 Subject: [PATCH] status line divider --- vim/colors/customred256.vim | 7 ++++--- vimrc | 14 ++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/vim/colors/customred256.vim b/vim/colors/customred256.vim index ceb6c0e..c691f77 100644 --- a/vim/colors/customred256.vim +++ b/vim/colors/customred256.vim @@ -196,11 +196,12 @@ hi TabLineSel ctermfg=250 guifg=#bcbcbc ctermbg=234 guibg=#1c1c1c hi TabModified ctermfg=250 guifg=#bcbcbc ctermbg=234 guibg=#1c1c1c hi TabModifiedSelected ctermfg=255 guifg=#eeeeee ctermbg=234 guibg=#1c1c1c -hi StatusLineNormal ctermfg=243 guifg=#777777 ctermbg=234 guibg=#1c1c1c term=none cterm=none hi! def link StatusLine StatusLineNormal +hi StatusLineNormal ctermfg=243 guifg=#777777 ctermbg=234 guibg=#1c1c1c term=none cterm=none hi StatusLineInput ctermfg=255 guifg=#ffffff ctermbg=239 guibg=#4e4e4e term=none cterm=none -hi StatusLineNC ctermfg=238 guifg=#444444 ctermbg=234 guibg=#1c1c1c term=none cterm=none -hi StatusLineSeparator ctermfg=232 guifg=#000000 ctermbg=232 guibg=NONE +hi StatusLineNC ctermfg=238 guifg=#444444 ctermbg=234 guibg=NONE term=none cterm=none +hi StatusLineDivider ctermfg=234 guifg=#1a1a1a ctermbg=234 guibg=#1a1a1a term=none cterm=none +hi StatusLineSeparator ctermfg=232 guifg=#ffffff ctermbg=232 guibg=NONE hi StatusLineDir ctermfg=241 guifg=#666666 ctermbg=234 guibg=#1c1c1c hi StatusLineFile ctermfg=250 guifg=#cccccc ctermbg=234 guibg=#1c1c1c hi StatusLineFileMod ctermfg=250 guifg=#cccccc ctermbg=88 guibg=#490000 diff --git a/vimrc b/vimrc index 7550b1c..34f3b75 100644 --- a/vimrc +++ b/vimrc @@ -251,9 +251,14 @@ iabbrev tehn then " #statusline format{{{ " isactive = 0 when inactive, 1 otherwise + + + +" get status line{{{ function! GetStatus(isactive) let l:separator='%#StatusLineSeparator#' let l:statusline='' +"}}} " linter status let l:statusline.='%#InterfaceH2# %{LinterStatus()} %*' @@ -279,6 +284,8 @@ function! GetStatus(isactive) let l:statusline.=l:separator . ' %*' let l:statusline.=" %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*" let l:statusline.=l:separator . ' %*' + else + let l:statusline.='%#StatusLineDivider# %< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >%* ' endif " right/left separator @@ -293,11 +300,6 @@ function! GetStatus(isactive) let l:statusline.="%{expand('%:p:h')}/" endif - " if &l:modified - " let l:statusline.='%#StatusLineFileMod#' - " else - " let l:statusline.='%#StatusLineFile#' - " endif let l:statusline.='%#StatusLineFile#' let l:statusline.="%{expand('%:t:r')}" @@ -316,7 +318,7 @@ function! GetStatus(isactive) return l:statusline endfunction - +" status line autocommands augroup status autocmd! autocmd WinEnter * setlocal statusline=%!GetStatus(1)