Skip to content

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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.