pycharm convert tabs to spaces automatically

Vaibhav Mishra picture Vaibhav Mishra · Aug 5, 2012 · Viewed 114.9k times · Source

I am using pycharm IDE for python development it works perfectly fine for django code so suspected that converting tabs to spaces is default behaviour, however in python IDE is giving errors everywhere because it can't convert tabs to spaces automatically is there a way to achieve this.

Answer

CrazyCoder picture CrazyCoder · Aug 5, 2012

Change the code style to use spaces instead of tabs:

spaces

Then select a folder you want to convert in the Project View and use Code | Reformat Code.