Return to previous edit postion

I'm new to IDEA.

Assume I am editing a source module (A) and use the shortcut, Go to declaration (ctrl-b), which takes me to another source module (B).

Is there a shortcut I can use to return me to my position in the original file (A)?

Thanks, Lars

Comment actions Permalink

IDEA has a browser-like history with forward and backward navigation commands.

By default, the keyboard bindings are:


There are also icons for these actions in the toolbar. They take the form of a yellow square with a purple left-pointing (go back) or right-pointing (go foward) arrows. They will enable only when there's something in the history in the respective direction.

Randall Schulz

Comment actions Permalink

Ctrl+Alt+Right/Left navigates between browsed locations.
Ctrl+Shift+Backspace navigates to latest edit position.
All these actions could be found under 'Go To' menu, but the best way to find action is 'Find Action' action from Search menu (Ctrl+Shift+A)

Comment actions Permalink

While navigation retraces are certainly helpful if all I did was take a quick peek at a declaration, I really would like a true 'return' from explicit operations like Ctrl-B, Ctrl-U, Shift-Ctrl-T, etc. A very common scenario for me is to do something like Ctrl-B, and then make changes there and/or do additional navigation. Then I can't easily return to where I was before without going through a non-deterministic and variable number of Ctrl-Alt-Left operations.

I'm not sure how much info is stored in the navigation log, such as the source of such movements, but the functionality I'm looking for might be:

- Return to the previous location that was something other than a simple cursor movement.

It's like the separation of a "context switch", from general editing operations within each context.

Thanks for any consideration.

Comment actions Permalink

bookmarks can help you:
and consider to leverage quick definition lookup - Ctrl+Shift+I for smoothless code editing.

regards, Alex

Comment actions Permalink

Also try Ctrl+E and Ctrl+Shift+E: this shows recent files and recently edited files respectively


Please sign in to leave a comment.