For you custom navigation needs, ReSharper provides a way of marking code lines with bookmarks and navigating between them.
There are two types of bookmarks:
- Numbered bookmarks - you can toggle each bookmark of this type and navigate to each of them with the dedicated shortcut: Ctrl+Shift+<digit> toggles the corresponding bookmark; Ctrl+<digit> navigates to the corresponding bookmark. You can have up to 10 numbered bookmarks simultaneously.
- Anonymous bookmarks - these bookmarks can be only toggled and navigated from the bookmarks pop-up. You can have unlimited number of these bookmarks.
Bookmarks are displayed in the left part of the editor, on the action bar . Numbered bookmarks have small numbers, unnumbered bookmarks have solid fill. Here is how a numbered bookmark #3 looks like:
Note that bookmark icons do not react on mouse clicks. To operate on bookmarks, use the corresponding shortcuts or menu commands.
To add a numbered bookmark, press Ctrl+Shift+<digit>. If this number is occupied by another bookmark, it will be replaced.
Both numbered and unnumbered bookmarks can be added with the bookmarks pop-up as described below.
To add a new bookmark
- Place the caret at the code line you want to mark.
- Press Ctrl+` or choose in the main menu.
- The bookmarks pop-up will appear: In this pop-up, you will see all bookmarks, if any, that are set in the current solution.
- Do one of the following:
- A bookmark is added and the corresponding icon appears to the left of the current line in the editor.
To go to a numbered bookmark, press Ctrl+<digit>. To go to a numbered or an unnumbered bookmark, you can use the bookmarks pop-up as described below.
To navigate to a bookmark
To remove bookmarks
- To remove all bookmarks in the solution, choose in the main menu.
- To remove all bookmarks in the currently opened document, choose in the main menu.
- To remove a numbered bookmark, Ctrl+Shift+<digit>.
- To remove a numbered or unnumbered bookmark, choose in the menu or press Ctrl+`. In the bookmarks pop-up, choose a bookmark thet you want to remove and press Delete.
This feature is supported in the following languages/technologies:
The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.