parent
a734c66019
commit
b6f44e7f4d
|
@ -202,10 +202,8 @@ hi StatusLineNC ctermfg=238 guifg=#444444 ctermbg=232 guibg=NONE term=none c
|
|||
hi StatusLineNormal ctermfg=243 guifg=#777777 ctermbg=234 guibg=#1c1c1c term=none cterm=none
|
||||
hi StatusLineActive ctermfg=255 guifg=#ffffff ctermbg=239 guibg=#4e4e4e term=none cterm=none
|
||||
hi StatusLineActiveQuotes ctermfg=244 guifg=#888888 ctermbg=239 guibg=#4e4e4e term=none cterm=none
|
||||
hi StatusLineDivider ctermfg=234 guifg=#1c1c1c ctermbg=234 guibg=#1c1c1c term=none cterm=none
|
||||
hi StatusLineDividerActive ctermfg=233 guifg=#111111 ctermbg=233 guibg=#111111 term=none cterm=none
|
||||
hi StatusLineDividerMod ctermfg=234 guifg=#1c1c1c ctermbg=234 guibg=#1c0000 term=none cterm=none
|
||||
hi StatusLineDividerModActive ctermfg=233 guifg=#111111 ctermbg=233 guibg=#330000 term=none cterm=none
|
||||
hi StatusLineDivider ctermfg=234 guifg=#1c1c1c ctermbg=234 guibg=#1c1c1c term=none cterm=none
|
||||
hi StatusLineSeparator ctermfg=255 guifg=#ffffff ctermbg=232 guibg=NONE
|
||||
hi StatusLineDir ctermfg=241 guifg=#666666 ctermbg=234 guibg=#1c1c1c
|
||||
hi StatusLineDirActive ctermfg=243 guifg=#777777 ctermbg=237 guibg=#3a3a3a
|
||||
|
|
34
vimrc
34
vimrc
|
@ -252,13 +252,13 @@ iabbrev tehn then
|
|||
" #statusline format{{{
|
||||
" isactive = 0 when inactive, 1 otherwise
|
||||
|
||||
" get status line
|
||||
" get status line{{{
|
||||
function! GetStatus(isactive)
|
||||
let l:separator='%#StatusLineSeparator# '
|
||||
let l:normal='%#StatusLineNormal#'
|
||||
let l:active='%#StatusLineActive#'
|
||||
let l:statusline=''
|
||||
|
||||
"}}}
|
||||
" linter status{{{
|
||||
let l:statusline.='%#InterfaceH2# %{LinterStatus()} %*'
|
||||
"}}}
|
||||
|
@ -289,20 +289,12 @@ function! GetStatus(isactive)
|
|||
endif
|
||||
"}}}
|
||||
" right/left separator{{{
|
||||
" let l:statusline.='%#StatusLineDivider'
|
||||
|
||||
" " if &modified == 1
|
||||
" " let l:statusline.='Mod'
|
||||
" " endif
|
||||
" echo a:isactive
|
||||
" if a:isactive
|
||||
" let l:statusline.='Active'
|
||||
" endif
|
||||
|
||||
"let l:statusline.='# %< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >' . l:separator . '%*%='
|
||||
""}}}
|
||||
" modified flag {{{
|
||||
let l:statusline.='%#StatusLineMod#%M' . l:separator . '%*'
|
||||
if a:isactive
|
||||
let l:statusline.='%#StatusLineDividerActive# %< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >' . l:separator . '%*'
|
||||
else
|
||||
let l:statusline.='%#StatusLineDivider# %< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >' . l:separator . '%*'
|
||||
endif
|
||||
let l:statusline.='%='
|
||||
"}}}
|
||||
" path/filename.extension{{{
|
||||
|
||||
|
@ -317,6 +309,7 @@ function! GetStatus(isactive)
|
|||
let l:statusline.="%{strlen(expand('%:e'))?'.':''}"
|
||||
let l:statusline.='%#StatusLineExtActive#'
|
||||
let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')}"
|
||||
let l:statusline.=' %*'
|
||||
else
|
||||
let l:statusline.='%#StatusLineDir# '
|
||||
let l:statusline.="%{expand('%:p:h')}/"
|
||||
|
@ -328,9 +321,12 @@ function! GetStatus(isactive)
|
|||
let l:statusline.="%{strlen(expand('%:e'))?'.':''}"
|
||||
let l:statusline.='%#StatusLineExt#'
|
||||
let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')}"
|
||||
let l:statusline.=' %*'
|
||||
endif
|
||||
let l:statusline.=' ' . l:separator
|
||||
|
||||
"}}}
|
||||
" modified flag {{{
|
||||
let l:statusline.=l:separator . '%#StatusLineMod#%M' . l:separator . '%*'
|
||||
"}}}
|
||||
" file percentage{{{
|
||||
let l:statusline.='%#InterfaceNormalDark#%P%*'
|
||||
|
@ -340,8 +336,8 @@ endfunction
|
|||
" status line autocommands{{{
|
||||
augroup status
|
||||
autocmd!
|
||||
autocmd WinEnter * set statusline=%!GetStatus(1)
|
||||
autocmd WinLeave * set statusline=%!GetStatus(0)
|
||||
autocmd WinEnter * setlocal statusline=%!GetStatus(1)
|
||||
autocmd WinLeave * setlocal statusline=%!GetStatus(0)
|
||||
" autocmd InsertChange * setlocal statusline=%!GetStatus(1)
|
||||
augroup END
|
||||
"}}}}}}
|
||||
|
|
Loading…
Reference in New Issue