Community
Participate
Working Groups
Build Identifier: 20100917-0705 I have selected the option "Insert spaces for tabs",Preferences->General->Editors->Text Editors。 Some time,it's OK.But,it does not work in a string,when I used the key "tab". Not insert spaces for tabs. Reproducible: Always Steps to Reproduce: 1.as a string,$str = "SELECT * FROM <tab>"... 2.<tab>,the flag is using tab key 3.tab just tab,not spaces
I think every input in a string should be treated as it was. If we change the tab to spaces in a string, then nobody can type a tab in string if he really want a tab.
For tab exist special char "\t". And what differences between editing 2 lines or 1 by pressing tab?
(In reply to comment #1) > I think every input in a string should be treated as it was. > > If we change the tab to spaces in a string, then nobody can type a tab in > string if he really want a tab. I'd vote for "\t" to use tabs in strings, but let it be the way it is. However, the problem I've encountered is not only that tabs are being inserted in strings, but just before strings too, and that's very annoying. Reproducible cases: 1. <?php $myArray['key']?> -- insert tab just before 'key', like so: <?php $myArray[<TAB>'key']?> 2. <?php array('a', 'b', 'c')?> -- type enter (next line) just after first clause after array and insert tab, like so: <?php array( <TAB>'a', 'b', 'c')?> or insert tab before any of 'a', 'b' or 'c' string -- you'll get <TAB> inserted.
I can confirm this one and is annying as hell. As said before me. it happens most times when trying to indent a single inteim in anarray. or even when edditing an array like this $a = array( 'foo'<tab>=> or $b = array( <tab>
I'm seeing this behavior as well with build 20100917-0705 on Mac OS 10.6.4.
This bug is absolutely annoying as it worked like a charm in previous versions. As the configuration gives the option "use spaces for tabs" than it has to use spaces, not tabs, equally if it's a string, an array, the beginning of a line or whatever. Checking files and replacing tab-chars over and over again is a tedious task. Please fix this as soon as possible - or add an option where the user can decide if all tabs are spaces or not, whatever you like most.
Try this as a stopgap. http://sourceforge.jp/projects/pdt-tools/releases/50444/note
(In reply to comment #7) > Try this as a stopgap. > http://sourceforge.jp/projects/pdt-tools/releases/50444/note It would use spaces - but also disables indentation for e.g. blocks of code.
Oops, I see. Moreover, the plugin doesn't work for Shift+Tab... I've fixed problems and uploaded new version. Thanks for your feedback :) http://sourceforge.jp/projects/pdt-tools/releases/50484/note
I also have this problem and I unsuccessfully wasted a lot of time for finding the decision. I agree with comment #6 and think that it should be fixed. Therefore I Vote for this bug. So in my opinion when I set "Insert spaces for tabs" I should have only spaces, for ability to insert the TAB symbol in this case I think it would be useful to use hotkey like Ctrl+Tab for example.
I would like to try the non official fix hosted here: http://sourceforge.jp/projects/pdt-tools/releases/50484 But there is "No Files Available For This Release". Is it normal? PHP Editor should works as JAVA Editor. In my case, if I set Space => 4 spaces (for text editor formatter or php editor formatter), there is no effect. Tabs are not changed to spaces.
(In reply to comment #11) Sorry about incovenience, new url is http://sourceforge.jp/projects/pdt-tools/releases/50605
*** Bug 336623 has been marked as a duplicate of this bug. ***
*** Bug 336647 has been marked as a duplicate of this bug. ***
fixed in head
Verified.
I see the same bug, Windows7 Eclipse IDE for C/C++ Developers Version: Indigo Release Build id: 20110615-0604 My previous version was working fine. "Window/Prefrences/General/Editors/Text Editors/Insert spaces for Tabs" is checked. I hit Tab, it does not add spaces, to confirm I hit backspace it deletes the whole tab, also if I click with mouse to the tab area the cursor goes only in either beginning or end.
(In reply to comment #17) > I see the same bug, Windows7 > Eclipse IDE for C/C++ Developers > Version: Indigo Release > Build id: 20110615-0604 It looks like you're running a June build. From the comments here, the bug wasn't fixed until July. Note: You can view tab characters by checking "General | Editors | Text Editors | Show whitespace characters" in preferences.
It still is present in the Indigo "Developer builds", built in September Eclipse IDE for C/C++ Developers Version: Indigo Service Release 1 Build id: 20110909-0630 Maybe the patch was not merged in the CDT-bundled Eclipse, I may have to wait for an update, or get the classic and add CDT As per your suggestion I turned on "Window/Prefrences/General/Editors/Text Editors/Show whitespace characters", now it is easier to see the Tab characters :)
I also tried Juno and the same bug exists, should I file a new bug? Version showing the bug: Eclipse IDE for C/C++ Developers Version: Juno Release Build id: 20110818-2043
I confirm this bug is also appearing in General Indigo with CDT plugin: Eclipse SDK Version: 3.7.1 Build id: M20110909-1335