Closed bbak closed 7 years ago
Hi, thanks for doing your homework :) What happens when you open that same PHP file outside of your project? Does it open with tabs or spaces?
To elaborate on @mitchell-as's question - please close your project via Project > Close All Projects, then try opening your files again.
Ha, touché. I really thought I had all use cases covered.
Same behavior. File Pref "use Tabs" is unchecked and the editor is indenting with SPACES.
No difference if I close and repopen Komodo after closing the Project or just close the Project.
Okay, and how about a random PHP file that Komodo has never seen before? (Both without an open project and with an open project.)
With Project open: same result. Without Project open: same result.
Ok, so it's very likely to be something in your global prefs.
Could you share your prefs.xml? It is located in your profile folder. Please send it to support@activestate.com and reference this bug report.
Done
Unfortunately we were not able to reproduce the issue with your prefs.xml.
Can you reproduce this using Help > Troubleshooting > Restart in Safe-mode
?
Please verify that when restarting in safe-mode Komodo should be using the default UI (all your settings would be temporarily reset).
Forgive the silly question, but the PHP files you are opening, do they already use spaces as indentation, but you are expecting Komodo to convert them to tabs? Or when you open a PHP file and press the "Tab" key, you get some number of spaces auto-inserted? I tried importing your prefs.xml file, opened an existing PHP file whose sole contents are
<?php
When I press "Tab", I get a tab inserted, not spaces. When I opened another existing PHP file whose sole contents are
<?php
<TAB>echo 'hi';
I see a tab character and pressing "Tab" yields a tab (not spaces).
OMG ! It was a good idea to ask silly questions! A 3rd Party Package, installed via composer, that we're using as a starting point in quite every project, came with it's own (hidden, of course) .editorconfig
file, forcing SPACES!
Looks like this is the root cause.
So, basically my own fault - I forgot that Komodo uses them by default. Sorry for wasting your time.
Nevertheless, some indicator (perhaps in the file prefs) that a .editorconfig
File is overriding something could prevent confusion. :-)
Nevertheless, some indicator (perhaps in the file prefs) that a .editorconfig File is overriding something could prevent confusion. :-)
Good point, I'll have a think on this :)
@Naatan there is an opened issue for that :)
@Defman21 I thought that sounded familiar: https://github.com/Komodo/KomodoEdit/issues/2011
Short Summary
In
Prefs->Editor->Indentation
I've set use Tabs as well as disallowed file contents to override this. And I've done that on Global as well as Project Level as well as on per FileType (PHP in my case). I've also renamed 'doc-state.xmlc' while Komodo was closed.Still, when opening a existing PHP file from the project, Indentation defaults to SPACES. In File Prefs the use Tabs setting is disabled. If I change it on file-level, everything is ok - until I close and reopen the file again.
In prefs.xml there's a
<boolean id="useTabs">1</boolean>
setting, which is not found in the .komodoproject file (even though the checkbox is on if I open Project Prefs).Manually adding
<boolean id="useTabs">1</boolean>
(right after<boolean id="useSmartTabs">0</boolean>
to the .komodoproject file doesn't change anything.Expected results
Use TABS
Actual results
Uses SPACES
Platform Information
Win 10, Komodo IDE 10.1.3