How to go back in Eclipse?

Is there a way to go back in Eclipse? Basically, when I'm jumping around a big project following the execution flow (ctrl + click and etc.), is there a way to retrace a step? If my code calls a method and I go to the method definition, is there a key combination that will take me back to the calling code?


Press Alt+Left Arrow and Alt+Right Arrow like you would in a web browser.


On OS X:

  • + [ ( Command + [ ) : Go Back
  • + ] ( Command + ] ) : Go Forward

As Robin mentioned, you can also jump to the last edit location. Ctrl+Q is the keyboard shortcut for this!


On Windows/Ubuntu this was always

ALT+LEFT ARROW = Go back

ALT+RIGHT ARROW = Go forward

However, on MAC OSX, for me it was

ALT(Option)+COMMAND+LEFT ARROW = Go back

ALT(Option)+COMMAND+RIGHT ARROW = Go forward

Hopefully this will help other Mac people in the future who banged their head on the desk when the other answers did not work.


In addition to the keyboard shortcut mentioned by @lucas, there is the left and right arrow icons in the toolbar. It also has a handy back to last edit location as well.

Both of these are of course reflected in the menu under Navigate as well.