Reputation: 6669
I am using OSX El Capitan and Atom 1.2.4. And I also have installed "tabs-to-spaces" package.
I am trying to setup the editor to indent and make the tab be 2 spaces. But I am not able to make this work, here is my setup
Thank you
Upvotes: 2
Views: 8318
Reputation: 1409
This is funny. I also like using 2 spaces and was struggling with the described behaviour. When I put the following lines into config:
".python.source":
editor:
tabLength: 2
(Main Menu -> Atom -> Config...)
Atom starts using 2 spaces in my python code. But if try to change settings in language-python package, those lines simply disappear and 4 spaces indentation is back. Thankfully all other settings seem to not reset this, so if you don't mess with language-python settings page, everything should be fine.
Upvotes: 8
Reputation: 6669
I answer my own question because could be useful for someone else.
Atom and the plugin are working, and are indenting 2 spaces.
But as I was writing Python code, the suggestion PEP8 is 4 spaces. Seems Atom is forcing 4 spaces.
Upvotes: 4