-
Notifications
You must be signed in to change notification settings - Fork 453
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
When beautify on save, don't unfold all the current code folds #116
Comments
Will have to do a little research to investigate if that is doable from my end with Atom Beautify. Beautification writes out beautified code to the editor, consequently removing all the un/fold marks and then re-creating them for the new code. Thanks for bringing this issue to my attention. Hopefully something can be figured out. |
May be able to accomplish this in the same way it works currently for cursors (save previous states, and restore after beautify): https://github.com/Glavin001/atom-beautify/blob/master/lib/beautify.coffee#L30-L48 Since the code has the potential to change dramatically, this may not work. |
Awesome! Thank you so much for looking into this. Sounds like you have a place to start. Thanks for keeping me updated. I look forward to trying it out if you get it working :) |
Upon reflection I think this is something that should be handled inside of Atom. Unfortunately, I am not sure how they will accomplish this, however I suggest that their I hope that this is something they will support in the future. |
There is an implementation I found that looks promising. Sublime-HTMLPrettify: https://github.com/victorporof/Sublime-HTMLPrettify |
something like that occurs with linter-jscs :( |
Is there a little update on this? Constantly folding/unfolding does not make a lot of fun. |
I would find this feature greatly useful as well. |
Dear God, yes please. Have this feature would be a big time saver. |
It looks like Atom now supports
This would be our best shot to get this to work -- let Atom deal with the changing of the text and state of the folds. This would require changing atom-beautify/src/beautify.coffee Line 120 in 8ead568
Pull Requests very welcome!! |
Published to v0.29.26 |
@Glavin001 Thanks so much! This is awesome! And thanks for not letting this issue die off. |
I have, beautify-on-save checked and when I save one of my js files, it unfolds all the code blocks I have folded up so then I have to go back and refold them all. This is by no means a high priority issue, but more something that would be a really nice enhancement to have.
I also understand this might be something completely out of atom-beautifiers control too.
The text was updated successfully, but these errors were encountered: