Community
Participate
Working Groups
I often have the need to insert text without the cursor moving to the end of the just inserted text. My recent experience is explaned next, but I experience it in many other situations as well. Suppose the following use case where I have a bunch of javadoc text: @see #Constant1 @see #Constant2 @see #Constant3 @see #Constant4 @see #Constant5 now I want to replace # with LongClassName. I have LongClassName. on my clipboard, i move the cursos to the first #, press backspace and CTRL+V The result is this: @see LongClassName.|Constant1 @see #Constant2 @see #Constant3 @see #Constant4 @see #Constant5 The cursor position is after the just inserted text. If I want to replace the next # then I need to do a lot of keystrokes to get to the correct position. The result is that I accept this or open the Find/Replace dialog. I often don't want to do that because it breaks my contact with the keyboard (mouse action required.) Is there a way to let the cursor stay in its place so that the insert would give me: @see |LongClassName.Constant1 @see #Constant2 @see #Constant3 @see #Constant4 @see #Constant5
(In reply to comment #0) > The result is that I accept this or open the Find/Replace dialog. I often > don't want to do that because it breaks my contact with the keyboard (mouse > action required.) Why do you need the mouse for that? > Is there a way to let the cursor stay in its place so that the insert would > give me: > @see |LongClassName.Constant1 > @see #Constant2 > @see #Constant3 > @see #Constant4 > @see #Constant5 No.
> > action required.) > > Why do you need the mouse for that? You are right. I could do that without the mouse. However, the dialog is mouse oriented. I could get away with tabbing and key movement (for example, try to change the button focus from "Replace" to "Replace All".) Reducing keystrokes is why I filed this.
(In reply to comment #0) The quickest way to achieve that is to use block selection mode: - Toggle Block Selection (Alt+Shift+A) - Shift+<5*Down> - Ctrl+V - Alt+Shift+A
(In reply to comment #3) > (In reply to comment #0) > The quickest way to achieve that is to use block selection mode: > - Toggle Block Selection (Alt+Shift+A) > - Shift+<5*Down> > - Ctrl+V > - Alt+Shift+A Thanks Markus that is already better. I am happy to make a little prototype. Could you point me to some interesting classes I could look at. For example, the one that does normal paste?