Skip to content

Instantly share code, notes, and snippets.

@omaraboumrad
Created November 5, 2015 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omaraboumrad/5e2783cc5f2c7f1670fc to your computer and use it in GitHub Desktop.
Save omaraboumrad/5e2783cc5f2c7f1670fc to your computer and use it in GitHub Desktop.
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