Instantly share code, notes, and snippets.

Embed
What would you like to do?
light vim fold text
" class Foo(Bar): │
" └── [ 13 ] ────•
set fillchars="fold: "
setlocal foldtext=ManualFillCharText()
function! ManualFillCharText()
" TODO: make it support the tabs/spaces/different width
let total = (v:foldend - v:foldstart)
let init_chars = repeat(' ', foldlevel(v:foldstart))
let actual = init_chars . '└──' . ' [ ' . total . ' ] '
return actual . '────•'
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment