From 137ec0000582ef64b324379dcb288a956aaa5f26 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Sat, 17 Mar 2018 12:46:20 +0000 Subject: [PATCH] status line file percentage moved --- vimrc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/vimrc b/vimrc index 806aadd..61f9e30 100644 --- a/vimrc +++ b/vimrc @@ -268,10 +268,14 @@ function! GetStatus(isactive) " let l:curbuf = bufnr('') " let l:statusline .= '%#CRNormal#' . l:curbuf . ': ' . &buftype . ' ' + " file percentage + let l:statusline.='%#FoldColumn#: %#InterfaceNormal# %P%* ' + + if a:isactive - let l:statusline.=l:active . '%q%h%w%#StatusLineActiveNoText#' + let l:statusline.=l:active . ' %q%h%w%#StatusLineActiveNoText#' else - let l:statusline.=l:normal . '%q%h%w%#StatusLineNormalNoText#' + let l:statusline.=l:normal . ' %q%h%w%#StatusLineNormalNoText#' endif let l:statusline .= "%{&buftype == '' ? '' : ' '}%s " @@ -280,9 +284,11 @@ function! GetStatus(isactive) " file info{{{ if a:isactive == 1 let l:statusline.=l:active - let l:statusline.=" %{strlen(&ft)?&ft:'none'}," - let l:statusline.='%{strlen(&fenc)?&fenc:&enc},' - let l:statusline.='%{&fileformat} ' + let l:statusline.="%{strlen(&ft)?&ft:'none'} " + let l:statusline.=l:separator . l:active + let l:statusline.=' %{strlen(&fenc)?&fenc:&enc} ' + let l:statusline.=l:separator . l:active + let l:statusline.=' %{&fileformat} ' let l:statusline.=l:separator . l:active let l:statusline.=' %{&spelllang} ' else @@ -356,7 +362,7 @@ else let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')}" let l:statusline.=' %*' endif - let l:statusline .= '%f' " TODO color + let l:statusline .= '%#CRNormal#%r' " TODO color "}}} @@ -405,11 +411,10 @@ endif endif "}}} - " file percentage{{{ - let l:statusline.=l:separator . '%#InterfaceNormalDark#%P%*' + return l:statusline endfunction -"}}} + " status line autocommands{{{ augroup status