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