Komodo has a bug in the setting "Allow file contents to override tab settings". Here (in #1) is how to fix it such that you will no longer need to change the per-file settings:
- Go to: Preferences->Editor->Indentation. From this screen. Turn off "Allow file contents to override tab settings" as this is very buggy and can cause Komodo to over-ride your settings (hence the need to change the per-file-setting)
- From the same screen - change the "Number of Spaces per Indent" to 4
- From the same screen - use the drop down to check the per-language tab settings for each file type you are editing
- From the same screen - untick "Prefer tab characters over spaces" both in the upper section, and in the per-language section of this screen (be sure to check the drop down). The tab character settings appear to be buggy.
For currently open files, either close them all and re-open them, or do the following:
- Right click inside the text of the file->Properties and Settings->Indentation (or via Edit menu->Current File Settings; or via Code menu->Current File Settings). The Indentation section needs to be changed on a per-file basis for currently open files.
All new files / or newly opened files will now open with the correct indent settings from now on due to change in #1.
-- More Info --
- Post by 'zaknafein' tipped me off to the real cause of problem in point #1: http://community.activestate.com/forum/komodo-edit-spaces-instead-tabs-how#comment-10135
- This one tipped me off to the problem in point #4 http://community.activestate.com/forum/buggy-indentation
- More discussion: http://community.activestate.com/forum/usability-indentation-settings-komodo-are-broken