Bookmarks
If you want to return to some place in your code later, you can bookmark code lines as well as files and folders in your solution and in library code.
Line bookmarks are shown in the gutter. In addition to that, all bookmarks in the current solution are available in the Bookmarks tool window ( Alt+2) where they can be grouped in lists. The tool window also shows all breakpoints and pinned debugger items, which are added automatically to the dedicated lists.
![JetBrains Rider: Bookmarks tool window JetBrains Rider: Bookmarks tool window](https://resources.jetbrains.com.cn/help/img/rider/2024.2/bookmarks_window.png)
Toggle bookmarks
There are two types of bookmarks that you can use:
Mnemonic bookmarks are identified by a mnemonic — a digit (0 to 9)
or a letter (A to Z)
and their total number in your solution is limited to available digits and letters. Bookmarks with digits have dedicated shortcuts: press Ctrl+Shift+[digit] to toggle a bookmark with that digit and Ctrl+[digit] to jump to it.
Anonymous bookmarks
don't have any unique identifiers and allow you to place as many bookmarks as you want; you can quickly add and remove them by pressing F11
Add an anonymous bookmark
To bookmark a code line, place the caret at that line in the editor. To bookmark files and folders, select the corresponding item in the Solution explorer Alt+1.
Press F11.
Alternatively, right-click the gutter next to the code line select Add Bookmark.
If there are multiple bookmark lists, and none of them is set as default, you will have to choose the list to add the new bookmark to, otherwise the bookmark is added immediately to the default list.
An orange bookmark icon is added in the gutter next to the bookmarked line.
Add a mnemonic bookmark
To bookmark a code line, place the caret at that line in the editor. To bookmark files and folders, select the corresponding item in the Solution explorer Alt+1.
To add a bookmark with a digit, press Ctrl+Shift+[digit].
To add a bookmark with a digit or letter using a popup, press Ctrl+F11, or alternatively, right-click the gutter next to the code line select Add Mnemonic Bookmark.
When the popup opens, you can add a description for the bookmark and then press the desired digit or letter key on the keyboard. If you are using mouse, click the desired digit or letter two times.
If the selected mnemonic is already used, the IDE will ask you whether to overwrite an existing bookmark with the new one. Select Don't ask again to silently overwrite mnemonics.
If there are multiple bookmark lists, and none of them is set as default, you will have to choose the list to add the new bookmark to, otherwise the bookmark is added immediately to the default list.
A letter or a digit bookmark icon is added in the gutter next to the bookmarked line .
Add a mnemonic to an anonymous bookmark
Place the caret at a bookmarked line of code and press Ctrl+Shift+[digit] to add a bookmark with a digit or Ctrl+F11 to use the popup.
Alternatively, right-click an anonymous bookmark and select Assign Mnemonic.
When the popup opens, you can add a description for the bookmark and then press the desired digit or letter key on the keyboard. If you are using mouse, click the desired digit or letter two times.
Remove bookmarks
To remove any bookmark, place the caret to the corresponding line and press F11.
Alternatively, right-click a bookmark icon on the gutter and select Delete Bookmark.
To remove a mnemonic bookmark with a digit, place the caret to the corresponding line and press Ctrl+Shift+[digit].
You can also remove bookmarks using the Bookmarks window — select a bookmark and press Delete or right-click it and choose Delete Bookmark.
Bookmark editor tabs
Right-click an editor tab that you want to bookmark.
Use the Bookmarks menu group in the context menu:
If the file is not bookmarked, choose to add an anonymous or a mnemonic bookmark, or add bookmarks to all editor tabs.
If the file is already bookmarked, use one of the options to manage the bookmark.
Navigate bookmarks
Jump to mnemonic bookmark with a digit
Mnemonic bookmarks with digits are quickest to navigate to — just press Ctrl+[digit].
Jump to any mnemonic bookmark
Press Ctrl+Shift+F11 or choose
from the main menu . Alternatively, you can press Ctrl+Shift+A, start typing the command name in the popup, and then choose it there.In the popup that opens, press a digit or a letter key corresponding to a specific bookmark or alternatively, double-click it or select it with the keyboard and press Enter.
Navigate bookmarks (both mnemonic and anonymous)
Press Shift+F11 or choose
from the main menu . Alternatively, you can press Ctrl+Shift+A, start typing the command name in the popup, and then choose it there.In the popup that opens, double-click the desired bookmark or select it with the keyboard and press Enter. For mnemonic bookmarks in this list, you can press a digit or a letter key corresponding to a specific bookmark .
To configure whether to see only line bookmarks or both bookmarked lines and bookmarked files and folders in the popup, use the Show only line bookmarks in popup checkbox on the page of JetBrains Rider settings Ctrl+Alt+S.
Navigate with Bookmarks window
Press Alt+2 or choose Bookmarks tool window.
from the main menu to open theTo locate a bookmark in the window, start typing the name of the file or contents of the line where it is located.
Select the desired bookmark and press F4 or double-click it to locate the marked code lines in the editor, open the marked file, or locate the solution node in the Solution explorer.
Go to next/previous bookmark
To go to next/previous bookmark in the entire solution, in the order they appear in the Bookmarks tool window, press Ctrl+J, X/Ctrl+J, Z.
Navigate with error stripe
All bookmarks in the current file have dedicated markers on the error stripe. You can hover over these markers to see the bookmarks outside the editor viewport and click the marks to jump to the corresponding lines.
Manage bookmarks
All bookmarks management actions are available in the Bookmarks tool window Alt+2 and some of them are also available by right-clicking the corresponding bookmark icons on the gutter .
Rename bookmarks
In the Bookmarks tool window, bookmarks have short descriptions. By default, they contain the code from the line or the name of the item on which they are placed. If necessary, you can give bookmarks your own short descriptions.
Right-click a bookmark in the Bookmarks window or right-click a bookmark icon in the editor gutter.
Select
Rename Bookmark....
In the dialog that opens, specify a new description and click OK.
In a solution, there's one predefined bookmarks list that has the same name as the project. By default, JetBrains Rider adds your bookmarks there. If necessary, you can create multiple lists, move bookmarks between them, and set any of the list as the default.
Create a bookmarks list
Press Alt+2 or choose Bookmarks tool window.
from the main menu to open theIn the tool window, click
and name the new list in the dialog that opens.
Enable the Use as default list option if you want your bookmarks to go to this list automatically and click Create.
Move a bookmark to another list
In the Bookmarks tool window, drag a bookmark to another list.
Sort and group bookmarks
To move a bookmark up or down the list, right-click it in the Bookmarks tool window and select Move Up or Move Down.
To display line bookmarks in the tool window grouped by containing files, click
in the Bookmarks tool window and select the Group Line Bookmarks by File option.
Change the default list
JetBrains Rider adds all your bookmarks to the list that is configured as the default one. If necessary, you can use another default list for your bookmarks.
Press Alt+2 or choose Bookmarks tool window.
from the main menu to open theRight-click the list that you want to use as your default bookmarks list and select Mark List as Default.
The list is now located above others in the tool window and has the Default tag.
Delete a list of bookmarks
After you delete a list, all bookmarks from it are removed from code and project items.
Press Alt+2 or choose Bookmarks tool window.
from the main menu to open theRight-click the list that you want to delete and select Delete Bookmark List.