Is it possible for Pycharm to auto format my code after I finish one line and hit enter to jump to next line?

时间:2018-02-03 10:23:30

标签: pycharm code-formatting

I know Ctrl+Alt+L will do the trick, but is it possible to achieve this without hitting any key?Thanks.

1 个答案:

答案 0 :(得分:0)

Yes, it is possible and pycharm does that. Suppose if you write a function or condition or loop if you add colon after that and hit enter pycharm automatically format your code.
Example-
*

def function(): in this statement if you hit enter pycharm format you code and show cursor to the next line after a tab space.

*