Skip to main content
All docs
V22.2

Smart Navigation

  • 2 minutes to read

Smart Navigation allows you to navigate between neighboring cousin members, statements, arguments inside methods in C#, Visual Basic, TypeScript/JavaScript, and elements in XAML/XML.

You can use Smart Navigation with other CodeRush features to make routine actions faster. For example, you can navigate between methods and make them public, as shown in the screencast below. Press Caps Lock+Down to move down through the methods and then, Alt+Up/Alt+Down to change the method visibility (the Cycle Scope Up/Down feature).

smart-navigation-in-action

You can also navigate between variables and press Caps Lock+Space to make the variable declarations implicit.

smart-navigation-in-action

Note

The Caps+Space shortcut runs the Make Implicit/Explicit refactoring without invoking the Code Actions menu.

Commands

You can use the following commands to jump to neighboring cousin members, arguments inside methods, and elements:

Command Description Shortcut
SmartNavUp Moves the caret/selection to the previous cousin member, statement, argument, tag, or node above the current code line. Caps+Up/Caps+Shift+Up
SmartNavDown Moves the caret/selection to the next cousin member, statement, argument, tag, or node below the current code line. Caps+Down/Caps+Shift+Down
SmartNavLeft Moves the caret/selection to the previous cousin member, statement, tag, argument, or node on the current line or wraps the caret to the previous line. Caps+Left/Caps+Shift+Left
SmartNavRight Moves the caret/selection to the next cousin member, statement, tag, argument, or node on the current line or wraps the caret to the next line. Caps+Right/Caps+Shift+Right

If you invoke any of the Smart Navigation commands and there are no more sibling nodes in the search direction (for example, methods, constructors, fields, and properties), Smart Navigation shows the following message:

“No more nodes found before/after this point.”

If sibling nodes still exist in the direction, Smart Navigation shows the following message for the corresponding command:

“No more nodes found before/after this point. To jump to the previous/next sibling, invoke Smart Navigation again.”

Enable Caps as a Modifier

To use the Caps Lock key as a modifier similar to Alt, Shift, and Ctrl, ensure the Caps Lock as a Modifier feature is enabled in one of the following pages:

The “Caps Lock as a Modifier” Setup Wizard page.

setup-wizard

The “Quick Setup” options page.

quick-setup-page

For more information about the “Caps as a Modifier” feature, see the following topic: Caps as a Modifier.