Bookmarks in Eclipse, set and go using hotkeys, do they exist?
Say, Ctrl+Shift+1 = Set 1 bookmark
Ctrl+1 =
I don't think so. You can assign a shortcut to make bookmarks, but I don't think you can specify a hotkey for each individual bookmark you create.
In Eclipse 3.5, if you go to Windows > Preferences > General > Keys you'll find the Add Bookmark command. Add a hotkey in that dialog.
Then go to Window > Show View > Other... > Bookmarks to display the bookmarks tab.
As you would probably expect, double-clicking the entries in the bookmarks tab takes you to the bookmarked line of code.
I personally like these settings:
This way you can:
Not exactly.
You can only assign a shortcut to add a new bookmark (like I did in the picture below).
But you can go to the bookmark you have just defined only through the "Bookmarks" View (the second shortcut would only display the Bookmark view)
In Eclipse 3.5 there are some bookmarks related actions cthat can be linked to key shortcuts: to bind them you have to go to menu Window > Preferences > General > Keys and use the word "bookmark" as filter.
Saluti
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.
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:
image source: tutorial by vogella
So select any of the two dropdown and enable "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
.
Additional info: I've got Eclipse Kepler (v4.3) and as mentioned earlier, I've seen a few more bookmark commands available. Of particular interest is the "Next Bookmark" command, which is worth binding a keyboard shortcut to. This will work similar to the "Next Annotation" command, except only jumps to the bookmarks.
Warning: I've noticed that if you edit a file outside of eclipse and then return back to eclipse, you will have lost all your bookmarks, not nice.