Created
November 5, 2015 08:09
-
-
Save omaraboumrad/5e2783cc5f2c7f1670fc to your computer and use it in GitHub Desktop.
light vim fold text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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