问题
I'm loving Eclipse's feature of pressing F3 (or Ctrl + click) to jump to go to a declaration, but I also would like a keyboard shortcut to go back. Alt + ← doesn't always do that (it sometimes jumps to some other line in the class I'm visiting, but sometimes it does work, still haven't found a pattern in this) and Ctrl + Q isn't useful as I didn't always have something edited.
回答1:
Alt + ← seems to be the ultimate answer: How to go back in Eclipse?
This is also mentioned Eclipse Documentation.
回答2:
Sorry for reviving an old question, but since you still haven't got an accepted answer, I thought I'd give it a shot.
Alt + ← seems to take you back and forth between visited files. If the declaration is in the same file I would expect it not to jump back, but I haven't got a working Eclipse installation at hand. I'm guessing that could be the reason you're not seeing it work as expected ?
回答3:
The issue is familiar and really annoying, sometimes it jumps back right and sometimes goes to other place.
The solution for this is:
Unbind the key that is called 'Back', because it confuses the editor with the Backward History
Window->Preferences->General->Keys and search for Back
when you select Back clear its binding by pressing the backspace key in the keyboard
来源:https://stackoverflow.com/questions/4706915/eclipse-inverse-of-f3-alt-left-doesnt-always-work