Closed ipartola closed 5 years ago
This should keep whitespace between any kind of fold:
function! g:CoiledSnakeConfigureFold(fold)
let a:fold.num_blanks_below = 0
endfunction
If you want to keep whitespace between just classes and class methods, but not other kinds of folds (e.g. regular functions), you could do something like this:
function! g:CoiledSnakeConfigureFold(fold)
let is_class = (a:fold.type == 'class')
let is_method = (a:fold.type == 'function' && get(a:fold.parent, 'type', '') == 'class')
if is_class || is_method
let a:fold.num_blanks_below = 0
endif
endfunction
I would like to have whitespace between classes and class methods not be hidden. For example:
Should fold down to:
How do I use
num_blanks_below
to make that happen?