Bookmarks in Eclipse, set and go using hotkeys, do they exist?

Bookmarks in Eclipse, set and go using hotkeys, do they exist?

Say, Ctrl+Shift+1 = Set 1 bookmark

Ctrl+1 = go to the place first bookmark was set


Solution 1:

Yes. You need to set a shortcut key for Add Bookmark. Go to Window > Preferences > General > Keys and enter the text filter "bookmark". Add bookmark will be listed, select it. Now bind a new shortcut in Binding. Make sure that there are no conflicts.

bookmarks

It may be also a good idea to assign a shortcut to "Show View (Bookmarks)" where all your bookmarks are listed. Alternatively this can be enabled via Window > Show view > Other (shortcut Alt+Shift+Q, Q) > and filter to "bookmark".

From here on, you can set new bookmarks. Eclipse will want you to name your bookmarks.

You can navigate these bookmarks, using "Next Annotation" Ctrl+. and "Previous Annotation" Ctrl+, but you need to enable jumping to bookmarks first via the dropdown of these two in the annotations toolbar:

annot toolbar

image source: tutorial by vogella

So select any of the two dropdown and enable "Bookmarks":

Bookmarks

If you don't want other annotations such as Errors and Warnings to be included in the navigation, disable them in the toolbar dropdown for next/previous annotation.

The shortcut for Next/Previous Annotation can also be changed in the Preferences. Their category is Navigate, when: In Windows, you can filter to their names: Next and Previous.

Solution 2:

I was not really satisfy with what Eclipse has to offer. But I found a plugin called Quick Bookmarks. See Quick Bookmarks. I love it! I can assign a shortcut to a specif bookmark. Just what I needed. It works with every text file.