Skip to content

Use bookmarks

Use bookmarks to quickly focus on part of the code you are interested in.
For more information about bookmarks and source code navigation see the IntelliJ IDEA documentation.

Toggle bookmarks

The procedures described below can also be used to add bookmarks to rule and test files in the Project tool window. All files containing bookmarks will be saved in the Bookmarks tool window.

Add, delete and edit bookmarks in the editor

To toggle a bookmark:

  • Select the line of code and press F11.

Or:

  • Right-click the gutter and select Add Bookmark.

Note

  • If you have more than one bookmark list, a dialog will appear asking you to select a list to save your bookmark.
  • Check Use as default list to always save your bookmarks in the selected list.

The bookmark will be saved in the Bookmarks tool window.

To delete a bookmark:

  • Right-click the gutter and select Delete Bookmark.

Or:

  • Select the line of code and press F11.

To add or edit the bookmark description, right-click the bookmark and select Rename Bookmark.

Add, delete and edit mnemonic bookmarks in the editor

To create a bookmark identified by a letter or a digit:

  • Right-click the gutter and select Assign Mnemonic.

Or:

  • Select the line of code and press Ctrl-F11.

To edit the letter-based or digit-based bookmark:

  • Right-click the line of code and select Change Mnemonic.

Or:

  • Select the line of code and press Ctrl-F11.

To delete the letter-based or digit-based bookmark:

  • Right-click the line of code and select Delete Mnemonic.

Or:

  • Select the line of code and press F11.

Info

You can use a letter or digit only once. If you set a new bookmark with a mnemonic code you already used, a warning will appear asking you to rewrite the mnemonic code.

Bookmarks window

To show the bookmarks list press Shift+F11. This list provides a preview panel showing the bookmarked lines of code in its context. The window also has context-menu commands to manage existing bookmarks.

Select Soft-Wrap Preview Editor to activate soft-wrap for the selected line of code.

To jump to the bookmarked line of code, select the bookmark.

Bookmarks tool window

Bookmarks are also displayed in the Bookmarks tool window where they can be managed.

Create, edit and delete bookmarks and mnemonic bookmarks.

To create, edit and delete bookmarks and mnemonic bookmarks, follow the procedures described above for the editor. They are the same but they're applied in the tool window.

The only difference occurs when deleting a non-mnemonic bookmark in the tool window: in the editor, you can select the line of code and press F11, in the tool window, you have to press F2.

Expand and collapse

To expand and collapse the list of bookmarks:

  • Select the expanding/collapsing arrow / to the left of your bookmark lists and your files.

Or:

  • Double-click the bookmark lists and your files.

Or:

  • Select Expand All or Collapse All on the toolbar.

Jump to a bookmarked line of code:

To jump to a bookmarked line of code:

  • Double-click the bookmark.

Or:

  • Select the bookmark and press F4.

Or:

  1. Select Show Options Menu on the toolbar and then Navigate with Single Click.
  2. Select your bookmark.

Create a bookmark list

To create a new bookmark list:

  1. Select Create Bookmarks List on the toolbar.

    Or:

    Press Alt-Ins while in the toolbar.

  2. Type a name under Bookmarks list.

  3. Optionally check Use as default list to automatically save your next bookmarks in that list.
  4. Select Create or press Enter.

Rename bookmark description

To rename your bookmarks, your bookmark lists or the files containing the bookmarks:

  1. Select your item.
  2. Select Rename Bookmark on the toolbar.
  3. Add a description and select OK or press Enter.

Or:

  1. Select your item.
  2. Press F2.
  3. Add a description and select OK or press Enter.

Or:

  1. Right-click your item and select Rename Bookmark.
  2. Add a description and select OK or press Enter.

Sort your bookmarks

To sort your bookmarks in a bookmark list, right-click the bookmark list and select Sort.

Move your lists, files and bookmarks

To move your items up and down in the tool window, right-click the item and select Move Up/Move Down.

Enable preview tab

To enable a preview tab showing the file containing the bookmarks, select Show Options Menu on the toolbar and then Enable Preview Tab.

Note

With this tab on, a single-click navigation throughout your files will be activated.