indent python file (with pydev) in eclipse

Saied_Delshad picture Saied_Delshad · Oct 4, 2011 · Viewed 28k times · Source

I'm a newbie in eclipse. I want to indent all the lines of my code and formatting the open file by pressing a shortcut or something like that... I know the CTRL+SHIFT+F (as it actually doesn't work in pydev!!) I've been searching for hours with no success. Is there any way to do that in eclipse. kind of like CTRL+K,D in visual studio, which formats and indents all the source code lines automatically?

Answer

Demyn picture Demyn · Jun 1, 2012

If you want to change from 2 space to 4 space indentation (for instance), use "Source->Convert space to tab" with 2 spaces, then "Soruce->Convert tab to space" with 4 spaces.