From b6f44e7f4da63d5ad4428b21b8d8c4fce1573691 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Thu, 15 Mar 2018 19:31:44 +0000 Subject: [PATCH] Revert "fucked up status line" This reverts commit a734c66019ad4a975c50644d30c864c2e6158810. --- vim/colors/customred256.vim | 6 ++---- vimrc | 38 +++++++++++++++++-------------------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/vim/colors/customred256.vim b/vim/colors/customred256.vim index 3147d31..00c76ce 100644 --- a/vim/colors/customred256.vim +++ b/vim/colors/customred256.vim @@ -189,7 +189,7 @@ hi! def link ModeMsg InterfaceMsg hi NonText ctermfg=243 guifg=#767676 hi! def link Title InterfaceH3 - + hi TabLine cterm=none ctermfg=242 guifg=#666666 ctermbg=234 guibg=#1c1c1c hi TabLineFill cterm=none ctermfg=255 guifg=#eeeeee ctermbg=234 guibg=#1c1c1c hi TabLineSel ctermfg=250 guifg=#bcbcbc ctermbg=234 guibg=#1c1c1c @@ -202,10 +202,8 @@ hi StatusLineNC ctermfg=238 guifg=#444444 ctermbg=232 guibg=NONE term=none c hi StatusLineNormal ctermfg=243 guifg=#777777 ctermbg=234 guibg=#1c1c1c term=none cterm=none hi StatusLineActive ctermfg=255 guifg=#ffffff ctermbg=239 guibg=#4e4e4e term=none cterm=none hi StatusLineActiveQuotes ctermfg=244 guifg=#888888 ctermbg=239 guibg=#4e4e4e term=none cterm=none -hi StatusLineDivider ctermfg=234 guifg=#1c1c1c ctermbg=234 guibg=#1c1c1c term=none cterm=none hi StatusLineDividerActive ctermfg=233 guifg=#111111 ctermbg=233 guibg=#111111 term=none cterm=none -hi StatusLineDividerMod ctermfg=234 guifg=#1c1c1c ctermbg=234 guibg=#1c0000 term=none cterm=none -hi StatusLineDividerModActive ctermfg=233 guifg=#111111 ctermbg=233 guibg=#330000 term=none cterm=none +hi StatusLineDivider ctermfg=234 guifg=#1c1c1c ctermbg=234 guibg=#1c1c1c term=none cterm=none hi StatusLineSeparator ctermfg=255 guifg=#ffffff ctermbg=232 guibg=NONE hi StatusLineDir ctermfg=241 guifg=#666666 ctermbg=234 guibg=#1c1c1c hi StatusLineDirActive ctermfg=243 guifg=#777777 ctermbg=237 guibg=#3a3a3a diff --git a/vimrc b/vimrc index 305c2ca..1d319aa 100644 --- a/vimrc +++ b/vimrc @@ -252,13 +252,13 @@ iabbrev tehn then " #statusline format{{{ " isactive = 0 when inactive, 1 otherwise -" get status line +" get status line{{{ function! GetStatus(isactive) let l:separator='%#StatusLineSeparator# ' let l:normal='%#StatusLineNormal#' let l:active='%#StatusLineActive#' let l:statusline='' - +"}}} " linter status{{{ let l:statusline.='%#InterfaceH2# %{LinterStatus()} %*' "}}} @@ -288,21 +288,13 @@ function! GetStatus(isactive) let l:statusline.=l:separator . l:active endif "}}} - " right/left separator{{{ - " let l:statusline.='%#StatusLineDivider' - - " " if &modified == 1 - " " let l:statusline.='Mod' - " " endif - " echo a:isactive - " if a:isactive - " let l:statusline.='Active' - " endif - - "let l:statusline.='# %< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >' . l:separator . '%*%=' -""}}} -" modified flag {{{ - let l:statusline.='%#StatusLineMod#%M' . l:separator . '%*' + " right/left separator{{{ + if a:isactive + let l:statusline.='%#StatusLineDividerActive# %< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >' . l:separator . '%*' + else + let l:statusline.='%#StatusLineDivider# %< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >' . l:separator . '%*' + endif + let l:statusline.='%=' "}}} " path/filename.extension{{{ @@ -317,6 +309,7 @@ function! GetStatus(isactive) let l:statusline.="%{strlen(expand('%:e'))?'.':''}" let l:statusline.='%#StatusLineExtActive#' let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')}" + let l:statusline.=' %*' else let l:statusline.='%#StatusLineDir# ' let l:statusline.="%{expand('%:p:h')}/" @@ -328,9 +321,12 @@ function! GetStatus(isactive) let l:statusline.="%{strlen(expand('%:e'))?'.':''}" let l:statusline.='%#StatusLineExt#' let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')}" + let l:statusline.=' %*' endif - let l:statusline.=' ' . l:separator +"}}} + " modified flag {{{ + let l:statusline.=l:separator . '%#StatusLineMod#%M' . l:separator . '%*' "}}} " file percentage{{{ let l:statusline.='%#InterfaceNormalDark#%P%*' @@ -340,12 +336,12 @@ endfunction " status line autocommands{{{ augroup status autocmd! - autocmd WinEnter * set statusline=%!GetStatus(1) - autocmd WinLeave * set statusline=%!GetStatus(0) + autocmd WinEnter * setlocal statusline=%!GetStatus(1) + autocmd WinLeave * setlocal statusline=%!GetStatus(0) " autocmd InsertChange * setlocal statusline=%!GetStatus(1) augroup END "}}}}}} - + " #autocommands{{{ " persistent folds