Adding spaces in multiple lines simultaneously - in Pycharm

user1396713 picture user1396713 · Jul 18, 2014 · Viewed 52.9k times · Source

I have a very simple question which I can not resolve. I am new to Pycharm and Python and I am trying to code a class. However every while and then I need to go line-by line and change the indent of the code.

Is there a shortcut in Pycharm where I can add spaces (format the indent) in the begging of a multiple lines simultaneously without processing each line individually ?

Thanks in advance

Answer

Oleg picture Oleg · Jul 19, 2014

Highlight/ select the lines you want indented, then press TAB as often as needed until they reach the proper indent level.

You can remove spaces with SHIFT TAB.

You can also use CTRL+ALT+I to auto-indent the selection.