rearranged
This commit is contained in:
parent
88d50f1f21
commit
5a8e4ce1be
|
@ -19,7 +19,7 @@ function! GetStatus(isactive) "{{{
|
||||||
else
|
else
|
||||||
let l:statusline .= '%#StatusLinePercent#'
|
let l:statusline .= '%#StatusLinePercent#'
|
||||||
endif
|
endif
|
||||||
let l:statusline .= '%P%* '
|
let l:statusline .= '%P %* '
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" non-empty buftype (help, quickfix, etc)
|
" non-empty buftype (help, quickfix, etc)
|
||||||
|
@ -31,38 +31,9 @@ function! GetStatus(isactive) "{{{
|
||||||
let l:statusline .= "%{&buftype == '' ? '' : ' '}%s"
|
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
|
" right/left divider
|
||||||
" modified version {{{
|
let l:statusline.=l:separator "{{{
|
||||||
|
" modified version
|
||||||
let l:color = 'StatusLineDivMod' . (a:isactive?'Active':'')
|
let l:color = 'StatusLineDivMod' . (a:isactive?'Active':'')
|
||||||
let l:statusline .= GetStatusFrag("&modified && mode() != 'i'", l:color, '%<', l:divider)
|
let l:statusline .= GetStatusFrag("&modified && mode() != 'i'", l:color, '%<', l:divider)
|
||||||
|
|
||||||
|
@ -80,7 +51,35 @@ function! GetStatus(isactive) "{{{
|
||||||
if !a:isactive
|
if !a:isactive
|
||||||
let l:statusline .= ' '
|
let l:statusline .= ' '
|
||||||
endif
|
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
|
" 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 "
|
||||||
|
|
Loading…
Reference in New Issue