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

@ -19,7 +19,7 @@ function! GetStatus(isactive) "{{{
else
let l:statusline .= '%#StatusLinePercent#'
endif
let l:statusline .= '%P%* '
let l:statusline .= '%P %* '
"}}}
" non-empty buftype (help, quickfix, etc)
@ -31,38 +31,9 @@ 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
endif
"}}}
" current register
if a:isactive "{{{
let l:statusline.=l:separator . l:active
let l:statusline.=' %#StatusLineActiveQuotes#"' . l:active . '%{v:register}%#StatusLineActiveQuotes#" '
endif
"}}}
" session status
if a:isactive "{{{
let l:statusline.=l:separator . l:active
let l:statusline.=" %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*"
let l:statusline.=l:separator . l:active
endif
"}}}
" right/left divider
" modified version {{{
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)
@ -80,7 +51,35 @@ function! GetStatus(isactive) "{{{
if !a:isactive
let l:statusline .= ' '
endif
"}}}
" current register
if a:isactive "{{{
let l:statusline.=l:separator . l:active
let l:statusline.=' %#StatusLineActiveQuotes#"' . l:active . '%{v:register}%#StatusLineActiveQuotes#" '
endif
"}}}
" session status
if a:isactive "{{{
let l:statusline.=l:separator . l:active
let l:statusline.=" %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*"
let l:statusline.=l:separator . l:active
endif
"}}}
" 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
"}}}
" 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 "