Reformat with each "Save"

Answered
I tried to find a thread which discusses that, but I didn't found a way for an "advanced forum search" which allows to limit a search for subjects and a specific sub forums.

Of course there are reasons for not to offer the function I'm looking for as a default.

Therefor I just ask, if there's a plugin for that?

Thanks for your advice.
4 comments
Comment actions Permalink
There are no save actions (as there are in Eclipse). The commit dialog has a checkbox to reformat all changed files, though. Of course, you can always use the keyboard shortcut to reformat as well.

On a side note: I would find it rather weird if the code changed by itself without me triggering that explicitly. Files are being saved automatically for you, so I suppose, this reformat would happen at unexpected moments anyway...
0
Comment actions Permalink
Of course such behaviour should not be a default. But if the the function "reformat" works smart and reliable, than I don't know a reason why one (who likes consistent formatting) should perform reformat manually/decide anything about that task.
0
Comment actions Permalink

I couldn't agree more with the last comment and would love this feature. Can we please have it? 

Having it doesn't mean that everybody will use it but if you use something like `yapf` across a big team like us - you can "set it and forget it" and let the IDE take care of the formatting as you keep typing the code, without you having to format it for every line and then finally for the team. 

 

0
Comment actions Permalink

As a compromise solution you can enable formatting on commit:

0

Please sign in to leave a comment.