pycharmformatting

In PyCharm, is it possible to do "the Reformat Code" every time I save a file?


I would like to automatically reformat the code in a file whenever I save it. Is it possible to do it in PyCharm? So far, this is the only feature from Eclipse I cannot find in PyCharm.

If it is possible, can you please point me to the setting. I have gone through the preferences and looked around the Internet but am unable to find this setting (if it exists).

P.S. PyCharm devs: if this does not exist, it is at the top of my PyCharm wish list.


Solution

  • JetBrains team is working on ability to have on-save-actions. You'll be able to record a macro of what actions need to happen when you hit Ctrl/Command+S. Not sure when this will be released though.

    More information at http://youtrack.jetbrains.com/issue/IDEABKL-6722