Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

eclipse

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

like image 635
EugeneP Avatar asked Jun 29 '10 14:06

EugeneP


People also ask

How do I show bookmarks in Eclipse?

Opening the Bookmarks ViewClick on the Window menu and select Show View → Other. In the filter text box enter Bookmark. Under General, select Bookmarks.

What is CTRL Shift G in Eclipse?

Ctrl + Shift + G. Search for references in the workspace. Command + T. Ctrl + T. Shows type hierarchy of the current java class.

How do I get to my next bookmark?

Keyboard shortcut is CTRL+F2. Moves the cursor to the next available bookmark.

What does CTRL S do in Eclipse?

1.1. Eclipse supports of course the typical shortcuts, e.g. Ctrl + S for saving, Ctrl + C for copying the selected text or file and Ctrl + V for pasting the element currently in the clipboard.


2 Answers

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.

like image 193
n611x007 Avatar answered Sep 19 '22 21:09

n611x007


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.

like image 21
Pierre Thibault Avatar answered Sep 19 '22 21:09

Pierre Thibault