Apologies, but me blindly trying to reproduce a reported indentation issue without first confirming basic information would be a waste of both of our time. Also, even veterans make mistakes so please have patience.
Are you using a project for these files? Can you confirm that the indent settings for the Project and Files are not set to 8?
Also the Languages specific indentations may be set to 8 as well.
Yes, it is in a project. I have confirmed that PHP files within the same project are indenting just fine. It appears to only be the files ending with “.ctp” which are CakePHP specific view files. Somewhere there could be a project setting for 8 spaces - all the settings I’ve seen are set to 4 spaces. As far as I can tell the preferences for my Komodo Edit 9 are identical to those in my Komodo Edit 8, and the same ctp files behave correctly in 8 but not in 9.
Perhaps your Preferences > File Associations might be messed up for “*.ctp” files. By default ctp is associated with PHP and it’s working fine for me in ctp files.
Just noting one of your first comments above. What do you mean there? Are you setting ALL ctp files that you open to 4 spaces in the file level preferences?
Yes, in preferences every file should set to 4 spaces (no tabs). It appears this only occurs on ctp files that were previously saved with tabs (not spaces).
Please check what language “.ctp” files are associated with for you under Preferences > File Associations, then go to Preferences > Editor > Indentation and check the indentation settings for that language.
Finally, if that doesn’t work, could you create an all-new .ctp file and see if its indentation is being properly set?
I’ve verified “.ctp” is in the file associattions as PHP. I’ve verified the file indentation is set to use 4 spaces, not tabs, and I’ve created a new .ctp file and the indentation is working properly. However, it is still not working on existing .ctp files where the indentation was set previously to use tabs or 2 spaces (not 4 spaces).
Thanks for confirming. That is to be expected. Global preferences do not override file level preferences so any preferences that got set in previously opened files will remain.
This is not the same behavior when using Komodo Edit 8. Previously it handles this situation just fine, but since using 9, this problem has surfaced. I never had to delete an xmlc file when using 8.
So why does this exact same file work properly in 8 but not in 9? The same file opened in 8 will show the correct indentation, but does not in 9, and won’t even let me correct it in any way. Whatever settings I change in 9, I cannot change the indentation to 4 spaces.
Because you were using Komodo 9 when the problem started happening. Komodo 8 and Komodo 9 do not share settings, Komodo 9 only inherits them from Komodo 8 when it is first launched.
I’ve spent a lot of time (too much) trying to make sure the settings for both 8 and 9 are identical. I still do not understand why it still works fine in 8 but not in 9. I’ve used Komodo Edit for years and I’ve never had any problems until I started using 9.
I also experienced this issue when I had the PHP files that suppose to use SPACES but would use TABS for indentation. Komodo ver. 9.1.3. I transferred settings from Komodo 8.
What helped me is opening the file and going into Edit->Current File Preferences->Editor->Indentation.
Mark Prefer Tab characters over space as ENABLED (was DISABLED originally). Click OK. If you test it, it would be TABBING obviously.
Then again go to Edit->Current File Preferences->Editor->Indentation and uncheck Prefer Tab characters over space. Click OK. Now if you test it you should see SPACES instead of TABS.
The same can be achieved in General Preferences. But for some reason it would not fix the TABBING for all docs in the current project. It would have to be done for each file you open. And then it would save the settings when next time you open it.
I work with files as Projects. I remember Komodo 8 had a preference for Indentation on a project level, but Komodo 9 does not and it seems to be causing some kind of overwriting.
Maybe as Defman suggested removing preferences does help to resolve it on a project level too, but it is a drag to reset since I have made many adjustments for colors and fonts.
I like Komodo 9, but it freezes for me a lot (I am on Yosemite 10.10.5). For example when dealing with saving these TABBING settings and pressing OK, I would have to RELOAD Komodo since the sidebar with the list of my Project files (loaded using SFTP) would stop responding, nothing happens when I click/doubleclick on files. But I am guessing this is a separate issue.
Hope this helps some who do not wish to do the full reset.
Did you uncheck “Allow file contenst to override Tab and Indentation settings” under Global > Editor > Indentation?
I tried both unchecked and checked, it does not seem to affect the behavior. But it still did not apply TABBING changes project-wide.
Also I noticed that the Apply button can replace the need to reopen Edit->Current File Preferences->Editor->Indentation. Simply checking “Prefer Tab characters over space” and pressing Apply and then unchecking it does solve the issue in the file. And it remembers it no matter whether the file was Saved or not.