2019-11-11 04:48:47 +01:00
|
|
|
func! STL()
|
|
|
|
let stl = '%f [%{(&fenc==""?&enc:&fenc).((exists("+bomb") && &bomb)?",B":"")}%M%R%H%W] %y [%l/%L,%v] [%p%%]'
|
|
|
|
let barWidth = &columns - 65 " <-- wild guess
|
|
|
|
let barWidth = barWidth < 3 ? 3 : barWidth
|
|
|
|
|
|
|
|
if line('$') > 1
|
|
|
|
let progress = (line('.')-1) * (barWidth-1) / (line('$')-1)
|
|
|
|
else
|
|
|
|
let progress = barWidth/2
|
|
|
|
endif
|
|
|
|
|
|
|
|
" line + vcol + %
|
|
|
|
let pad = strlen(line('$'))-strlen(line('.')) + 3 - strlen(virtcol('.')) + 3 - strlen(line('.')*100/line('$'))
|
|
|
|
let bar = repeat(' ',pad).' [%1*%'.barWidth.'.'.barWidth.'('
|
|
|
|
\.repeat('-',progress )
|
|
|
|
\.'%2*0%1*'
|
|
|
|
\.repeat('-',barWidth - progress - 1).'%0*%)%<]'
|
|
|
|
|
|
|
|
return stl.bar
|
|
|
|
endfun
|
|
|
|
|
|
|
|
hi def link User1 DiffAdd
|
|
|
|
hi def link User2 DiffDelete
|
|
|
|
set stl=%!STL()
|
|
|
|
|
|
|
|
set number
|
2020-01-06 19:09:47 +01:00
|
|
|
set ignorecase
|
2019-11-11 04:48:47 +01:00
|
|
|
set laststatus=2
|
2022-07-05 13:19:50 +02:00
|
|
|
colorscheme slate
|