Discussion of small issues with editor

Disclaimer: I am a heavy mouse user.

I have some issue with the IDEA editor that annoy me from time to time. Since I am not sure if these are personal preferences or bugs, I prefer to start a little discussion before filing bugs.

Here are my (small) problems:

1. Select some lines and place the cursor in the first position of the next line. Then press Tab to indent the text. The last line does not get indented (although the cursor is placed there). Do you think this is a correct behaviour? I think the line where the cursor is placed should be part of the selection, no matter if characters in that line are selected or not (OpenOffice works in the way I want it).

2. Select some text and place the cursor in the middle of a word. When you click somewhere else, the selection gets cleared. But when you click on the cursor, the word the the cursor position gets selected. The editor obviously sees this as a double click on the word, but it constantly confuses me. Of course, clicking twice at the same location should select a word, but not if another selection has been made before.

3. Select some indented text, cut and paste it somewhere. Example (o means line not selected, x means line selected):


Case a) If you started the selection at the beginning of the line and paste it after the line "int d;" you will get this:


Case b) But if you did not select the white space in front of "int b;" you will get this after pasting:


Although I can understand why the editor does this, I do not agree to this behaviour. I think in both cases the result should be like in case a. I just checked how VisualBasic6 (the only Microsoft IDE I have access to right now) does it, and it works like I would expect it.



So please give your opinions (or ask in case some of my explanations are not clear). Do you think these are bugs, or do you think this is a correct behaviour? Maybe there even is a way for customizing the editor to make it work as I want it to.


6 comments

1. Select some lines and place the cursor in the first position of the next line. Then press Tab to indent the text. The last line does not get indented (although the cursor is placed there). Do you think this is a correct behaviour? I think the line where the cursor is placed should be part of the selection, no matter if characters in that line are selected or not (OpenOffice works in the way I want it).


Essentially, you want the line below the selection indented as well?
That seems very non-intuitive to me. The point of selecting text is to
indicate what you want indented.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

0

If I understand correctly, I think your issue #2 is discussed in SCR 9919 (and fixed in build 812):

http://www.intellij.net/tracker/idea/viewSCR?publicId=9919

0

I guess this issue is really a personal thing. I think the line where the cursor is placed is part of the selection, but I can quite well understand your argument. Maybe here I will have to change instead of the editor.

0

I believe you can resolve issue 3 in the editor preferences, under Paste->Reformat->Reformat block

0

I just checked how Netbeans and Eclipse behave on these issues.

1. Same behaviour as IDEA. Looks like I am wrong here.

2. Both work as I would expect it (and different than IDEA). This seems to be a little bug in IDEA. I will check if it was fixed in the EAP releases and if not file a bug report.

3. Both work fine in the second case, but both fail in the first case (just the opposite of IDEA). I also checked with VB6 and it behaves the same as Netbeans. So they are not better than IDEA, they just make the mistake in different cases. I will check this with an EAP release and file a bug in case it has not been fixed yet.


And I also noticed that IDEA seems to be the fastest of the three IDEs. I was a bit shocked by the slow scrolling of Eclipse's editor.

0

That's correct, thanks a lot. This will switch between the Eclipse/Netbeans/VB behaviour and the default IDEA behaviour.

0

Please sign in to leave a comment.