rearranged

This commit is contained in:
ManjaroOne666 2018-03-28 21:02:37 +01:00
parent 88d50f1f21
commit 5a8e4ce1be
1 changed files with 33 additions and 35 deletions

View File

@ -31,18 +31,25 @@ function! GetStatus(isactive) "{{{
let l:statusline .= "%{&buftype == '' ? '' : ' '}%s" let l:statusline .= "%{&buftype == '' ? '' : ' '}%s"
"}}} "}}}
" file info " right/left divider
if a:isactive == 1 "{{{ let l:statusline.=l:separator "{{{
let l:statusline.=l:active " modified version
let l:statusline.=" %{strlen(&ft)?&ft:'none'} " let l:color = 'StatusLineDivMod' . (a:isactive?'Active':'')
" let l:statusline.=l:separator . l:active let l:statusline .= GetStatusFrag("&modified && mode() != 'i'", l:color, '%<', l:divider)
" let l:statusline.=' %{strlen(&fenc)?&fenc:&enc} '
" let l:statusline.=l:separator . l:active " unmodified version
" let l:statusline.=' %{&fileformat} ' let l:color = 'StatusLineDiv' . (a:isactive?'Active':'')
" let l:statusline.=l:separator . l:active let l:statusline .= GetStatusFrag("!&modified && mode() != 'i'", l:color, '%<', l:divider)
" let l:statusline.=' %{&spelllang} '
else " input mode version
let l:statusline.=l:separator if a:isactive
let l:statusline .= GetStatusFrag("mode() == 'i'", 'StatusLineDivInput', '%<', l:divider)
endif
let l:statusline.= l:separator . '%*%='
if !a:isactive
let l:statusline .= ' '
endif endif
"}}} "}}}
@ -61,26 +68,18 @@ function! GetStatus(isactive) "{{{
endif endif
"}}} "}}}
" right/left divider " file info
" modified version {{{ if a:isactive == 1 "{{{
let l:color = 'StatusLineDivMod' . (a:isactive?'Active':'') let l:statusline.=l:active
let l:statusline .= GetStatusFrag("&modified && mode() != 'i'", l:color, '%<', l:divider) let l:statusline.=" %{strlen(&ft)?&ft:'none'} "
" let l:statusline.=l:separator . l:active
" unmodified version " let l:statusline.=' %{strlen(&fenc)?&fenc:&enc} '
let l:color = 'StatusLineDiv' . (a:isactive?'Active':'') " let l:statusline.=l:separator . l:active
let l:statusline .= GetStatusFrag("!&modified && mode() != 'i'", l:color, '%<', l:divider) " let l:statusline.=' %{&fileformat} '
" let l:statusline.=l:separator . l:active
" input mode version " let l:statusline.=' %{&spelllang} '
if a:isactive let l:statusline.=l:separator
let l:statusline .= GetStatusFrag("mode() == 'i'", 'StatusLineDivInput', '%<', l:divider)
endif endif
let l:statusline.= l:separator . '%*%='
if !a:isactive
let l:statusline .= ' '
endif
"}}} "}}}
" path/filename.extension " path/filename.extension
@ -96,7 +95,6 @@ function! GetStatus(isactive) "{{{
let l:statusline.='%#StatusLineExtActive#' let l:statusline.='%#StatusLineExtActive#'
let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} " let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} "
let l:statusline .= '%#InterfaceSignWarning# %R' let l:statusline .= '%#InterfaceSignWarning# %R'
let l:statusline.=' %*'
else else
let l:statusline.='%#StatusLineDir# ' let l:statusline.='%#StatusLineDir# '
let l:statusline.="%{expand('%:p:h')}/" let l:statusline.="%{expand('%:p:h')}/"
@ -109,8 +107,8 @@ function! GetStatus(isactive) "{{{
let l:statusline.='%#StatusLineExt#' let l:statusline.='%#StatusLineExt#'
let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} " let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} "
let l:statusline .= '%#LinterWarningInactive# %R' let l:statusline .= '%#LinterWarningInactive# %R'
let l:statusline.=' %*'
endif endif
let l:statusline.='%*'
"}}} "}}}
" linter status " " linter status "