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

后端 未结 7 1056
谎友^
谎友^ 2021-02-02 05:53

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

Say, Ctrl+Shift+1 = Set 1 bookmark

Ctrl+1 =

7条回答
  •  走了就别回头了
    2021-02-02 06:45

    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.

提交回复
热议问题