tmhedberg / SimpylFold

No-BS Python code folding for Vim
BSD 3-Clause "New" or "Revised" License
653 stars 57 forks source link

autoload: Add option to fold away trailing blank lines #120

Closed Wuestengecko closed 4 years ago

Wuestengecko commented 4 years ago

This feature has been requested previously.

PEP-8 suggests:

Surround top-level function and class definitions with two blank lines.

Method definitions inside a class are surrounded by a single blank line.

When not folding them away together with the functions / classes they separate, this leads to a lot of unused screen space, with a single line for a folded class definition and one or two blank lines following it. This PR adds a new configuration option g:SimpylFold_fold_blank to change this behavior. It defaults to false, which means the current folding behavior remains unless changed explicitly.

tmhedberg commented 4 years ago

Thank you!