Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Build Identifier: 20090920-1017 I had a few lines indented like this aaa bbb ccc ddd eee fff ggg I then wanted to mark a few of them with a character in the beginning of the line for later action: x aaa x bbb xx ccc ddd x eee fff x ggg When I was done I wanted to use block selection to remove the Xs. This caused several problems. 1 If I selected the Xs all the way from the aaa to the ggg line I could not include the second x on the ccc-line. An example (the upper case Xs are selected. Note the lower case X on the ccc-line) X aaa X bbb Xx ccc ddd X eee fff X ggg A work around for this was to include the tab character after the X on the ggg-line (again, upper case X, as well as underscores (_) for white space characters, indicates selection): X_______aaa X_______ bbb XX______ccc ________ ddd X_______ eee ________fff X_______ggg However, when trying to replace the whole selection with a tab, nothing happened. Replacing it with space or any regular letter (i.e. a) worked fine. Ended up doing the edit in jEdit instead which had no problem selecting everything from the beginning of the line until the first tab stop and then replacing the selection with a tab. This was in an XML-file, in a comment. Reproducible: Always
(In reply to comment #0) > This was in an XML-file, in a comment. Does it work in a regular text editor?
Tab key doing a shift to the right is standard behavior and there's no way we'll change that.
That is a stupid answer. This is a real issue. Suggest a solution to it rather than WONTFIX.
The answer is not stupid, it just tells you we won't fix it.
Still, it is a real issue. It is not uncommon that you want to replace a character in the middle of a line with a tab.
>Still, it is a real issue. I didn't say it's not an issue (that would be INVALID or WORKSFORME). We just won't spend time to fix this. There's a simple workaround: copy Tab, select, paste.
Couldn't the behaviour for tabs depend on whether block selection is active or not? If there is a block selected, tab would be inserted at the block, if normal selection is active, tab would indent/unindent the lines.
Tom, we once discussed this (see comment 7). What do you think?
This is certainly doable... see bug 264168 for the discussion about tab behavior. The bug is against JDT-Text, but also affects other editors. *** This bug has been marked as a duplicate of bug 264168 ***