Navigate current context
JetBrains Rider provides a number of features that help you navigate your code based on the current context, that is according to the opened document and your caret position inside it:
- Navigate editor tabs and tool windows
- Navigate file by its structure
- Navigate to containing declaration
- Navigate members and tags
- Navigate implicit imports
- Editor breadcrumbs
- Navigate code by line numbers
- Scrollbar and related features
Command | How to invoke | Use it to |
---|---|---|
Move Caret to Previous Word Move Caret to Next Word | Ctrl+Left Ctrl+Right | Move the caret to the beginning/end of the current word, and then further word by word in the same direction. If Use CamelHumps is selected on the Editor | General | Typing Assistance settings page Ctrl+Alt+S, the caret will move to the next/previous capitalized word inside identifiers with CamelCase names. Note that by default, on Ctrl+Right the caret jumps to the end of the current word. This behavior is configurable in the Caret Movement section on the settings page. |
Move Caret to Line Start Move Caret to Line End | Home End | Move the caret to the first/last character on the current line. |
Go to Containing Declaration | Alt+Shift+[ | Move the caret to the declaration of a type or a function from any position within its body. |
Move Caret to Matching Brace | Ctrl+Shift+M | When the caret is right before or after a brace, a bracket, or HTML/XML tag, jump to the item that matches it. |
Move Caret to Code Block Start Move Caret to Code Block End | Ctrl+[ Ctrl+] | Move the caret to the opening/closing brace of the enclosing code block. |
Next Method Previous Method | Alt+Down Alt+Up | Move the caret to the declaration of the next/previous member in the current type. |
Move Caret to Page Top Move Caret to Page Bottom | Ctrl+Page Up Ctrl+Page Down | Move the caret to the top/bottom line of the currently visible editor area, without scrolling. |
Page Up Page Down | Page Up Page Down | Move the caret up/down to the current height of the editor area and scroll the document accordingly, and then further with the same step in the same direction. |
Move Caret to Text Start Move Caret to Text End | Ctrl+Home Ctrl+End | Move the caret to first/last character in the current document. |
Next Highlighted Error Previous Highlighted Error | F2 Shift+F2 | Move the caret to next/previous code issue highlighted in the editor. There are two modes of navigating code issues in the current file:
You can specify the desired behavior with the The 'Next Error' action goes through option on the Editor | Code Editing settings page Ctrl+Alt+S or you can hover over the status indicator, click and choose the desired behavior: |
Next Change Previous Change | Ctrl+Alt+Shift+Down Ctrl+Alt+Shift+Up | Jump between edits registered in a VCS. These shortcuts only work if version control integration is enabled for your solution. |