ReSharper 2024.3 Help

Structural navigation with Tab and Shift+Tab

ReSharper allows you to use the Tab and Shift+Tab keys to quickly move text selection to the next or previous code element without having to use the mouse or the arrow keys. This way you can quickly jump to the next or previous logical piece of code.

Here are a couple of examples:

  • When editing a method call, repeatedly hitting Tab will first select all arguments (in case you want to replace all of them), then each argument will be selected in turn.

  • When editing a for statement, Tab will select the initializer statement, then the terminating condition and then the iterator statement. Shift+Tab will do the same, but in reverse.

ReSharper: Structural Navigation

By default, ReSharper enables structural navigation with Tab/Shift+Tab unless your caret is not at indenting (before the first non-whitespace character). So you can still use Tab/Shift+Tab to indent/outdent the line. If necessary, you configure the behavior of these keys on the Environment | Editor | Behavior page of ReSharper options Alt+R, O: you can either disable this altogether, or specify when the standard behavior of Tab/Shift+Tab should be preserved.

You can also press Tab to jump out of brackets (curly braces, square brackets, and parentheses) as well as out of quotes when your caret is right before the closing one.
This comes in handy when your caret is automatically set inside brackets or quotes created with code completion, and you want to continue typing without reaching down to the right arrow key.

By default, this behavior is enabled for brackets and disabled for quotes in string literals. You can change the defaults on the Environment | Editor | Behavior page of ReSharper options Alt+R, O:

This feature is supported in the following languages and technologies:

Language: C#

Language: VB.NET

Language: C++

Language: HTML

Language: ASP.NET

Language: Razor

Language: JavaScript

Language: TypeScript

Language: CSS

Language: XML

Language: XAML

Language: Resx

Language: Build Scripts

Language: Protobuf

Language: JSON

Feature is available in C#

Feature is not available in Visual Basic

Feature is not available in C++

Feature is available in HTML

Feature is not available in ASP.NET

Feature is available in Razor

Feature is available in JavaScript

Feature is available in TypeScript

Feature is available in CSS

Feature is available in XML

Feature is available in XAML

Feature is not available in Resource files

Feature is not available in build script files

Feature is not available in Protobuf

Feature is not available in JSON

The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the ReSharper by language section.

Last modified: 26 May 2024