-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for markers in folding #81
Comments
I'm not sure about this, and would need opinions on what the best implementation would look like as I have no interest in this feature myself. And the implementation could get quite hairy and non-performant due to the way this plugin works. The only other issue that I can see this would really solve is #50. As the others want automated folding. PS. hdima/python-syntax has been forked with a lot of new features and Python 3.6 support over at python-vim/python-syntax. |
My opinion is that this feature is probably out of scope for what this plugin should do. I do understand the utility of what you're asking for, but I don't actually see demand for this specific feature; that is, marker-based dictionary folding combined with automatic folding for classes and functions. I think the ratio of general usage to added complexity would be too low to make it worthwhile. Folding dictionaries automatically may be worthy of more discussion, though, since that is a somewhat common request. |
@tmhedberg Amusingly, I've come to also want this feature, but from the other direction -- I have written a lot of Python code extensively using manual fold markers, but would like to also have function and class folding on occasion. Fold markers are good for much more than simply folding lengthy dictionaries and lists, including:
|
Sometimes I have portions of code that I would like to be folded as such as classes and functions.
For this, I use the vim's markers that are supported by Python-Syntax-Folding. eg:
I prefer this opt-in method because I don't want all dictionnaries to be folded, besides it allows me to allow folding on any type of code.
Note that Python-Syntax-Folding shows the text of the maker line in the fold so it can also serve as documentation for the folding:
I'd like to use python-syntax because it supports python3 syntax but the problem is that it does not support folding so I'm trying SimpylFold and this is the only lack of feature that prevent me to switch.
I think that adding support for markers in SimpylFold would provide a work around to the specific use cases requests that are reported by your users many times.
The text was updated successfully, but these errors were encountered: