How to go to the last cursor position in Eclipse if it is in the same file and has not been edited?

I used to use Eclipse, then I switched to IntelliJ for a while and now I'm back to Eclipse. IntelliJ has one thing that I cannot find in Eclipse: going to the actual last cursor position - even in the same file, and even if the cursor was moved between the lines using the arrow keys on the keyboard or mouse, IntelliJ can do this, and I found it useful.

For example:
I move the cursor using the down arrow keyboard, sequentially on lines 10, 20, 30.
Now I'm on line 30, and when I press Alt + left , I would like the cursor to go to line 20.
After pressing Alt + left again, I want the cursor to move to line 10.
After pressing Alt + right after that, I want the cursor to jump to line 20 again.

The following shortcuts are available in Eclipse:
Alt + left - it will move back to the last cursor position in another file, and not to the last cursor position in the current file, even if I already moved the cursor in the same file
Alt + right - it moves forward to the next cursor position in another file, and not to the next cursor position in the current file, even if I already moved the cursor in the same file
Ctrl + Q - moves the cursor to the last place in the edit

The latest version of Eclipse in which I tested the aforementioned shortcuts: Eclipse Luna 4.4.0.

I found the following discussion of the same problem (without such functionality in Eclipse), which is quite old, but it seems that this functionality is not implemented in Eclipse, since the discussion is on the eclipse forum .

Do any of you know if this functionality will be implemented in Eclipse? Is there a plugin for Eclipse that provides such navigation functionality to the last cursor position?

Please note that for the reasons described above, I am not satisfied with the solutions provided as an answer to this SO question "How do I get to the last cursor position in Eclipse?" Or another SO question, "How to return to Eclipse?" .

+34
eclipse
Jan 31 '14 at 15:10
source share
6 answers

Go to Settings / General / Keys. You can see or edit the bindings for:

Backward History: default is Alt← Forward History: default is Altβ†’ 

You can also use these shortcuts (and see key bindings) on the toolbar:

answered September 7 '12 at 8:27 Denis Seguret

+3
Jul 18 '17 at 20:45
source share

Use bookmarks for this because there is no other way to track the required lines of code. Here is a link on how to use bookmarks http://www.luisdelarosa.com/2005/02/16/eclipse-tip-use-bookmarks-to-track-important-places-in-your-code/

Screenshot of the above article content in the link: enter image description here

+1
Nov 25 '14 at 14:19
source share

There is an arrow Alt + left and Alt + right arrow to go to the previous / next cursor positions, and CtrlQ - to the last edited position

+1
Oct 27 '15 at 9:35
source share

I use side mouse buttons and it works for me

0
May 7 '15 at
source share

The key combination Ctrl + Q returns you to the last places where the editing was performed.

Use Ctrl + L to browse shortcuts. See Also Eclipse Shortcuts or This Eclipse Cover Sheet .

-one
Oct 13 '15 at 6:32
source share

Navigation> Back (Alt + Left_Arrow) already allows you to return to previous cursor positions even in the same file. For example. after pressing Ctrl + Click on the link to the local variable (to go to the declaration), then Alt + Left transfers the carriage back to the link.

Source source

-2
Jun 16 '15 at 8:13
source share



All Articles