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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To browse long functions, I sometimes wished that if, elif, else, for, while, try and except blocks were also folded by SympylFold. Would it be difficult to have them optionally folded ? Or maybe just if they were more than n lines long, something like:
let g:SimpylFold_fold_import = 0
let g:SimpylFold_fold_docstring = 1
" but also:
let g:SimpylFold_fold_ifelifelse = 5 " fold if more than 5 lines long
let g:SimpylFold_fold_for = 1 " always fold
let g:SimpylFold_fold_while = 0 " never fold
let g:SimpylFold_fold_tryexcept = 10 " fold if more than 10 lines long
.. or.. maybe it would be a nightmare?
The text was updated successfully, but these errors were encountered:
I don't think it would be difficult. It might be a nightmare of configuration options. :)
Usually, the minimum number lines within a fold is determined by Vim's built-in foldminlines option. If you want to set different minima for different fold types, that might get complicated, especially when it comes to figuring out how to interact with foldminlines in an intuitive way. But Boolean options to turn on and off folding of different types of blocks should be fairly straightforward.
That said, it's not something I'm interested in implementing myself, as I doubt I'd use it, and my preference is generally to keep this script simple rather than adding features. I would consider a pull request, though, if you wanted to send one.
To browse long functions, I sometimes wished that
if
,elif
,else
,for
,while
,try
andexcept
blocks were also folded by SympylFold. Would it be difficult to have them optionally folded ? Or maybe just if they were more thann
lines long, something like:.. or.. maybe it would be a nightmare?
The text was updated successfully, but these errors were encountered: