CodeRush Code Navigation inside Visual Studio – Tab to Next Reference
The Tab to Next Reference feature is the simplest and one of the most powerful navigation features of CodeRush. It allows you immediately see all references and navigate among them with ease. As the name says, the single Tab shortcut is used to navigate to the next reference of an identifier or a type reference under the editor caret. Hitting the Tab key again will move you to the next reference cyclically, in other words, you can tab to the next reference over and over again, even if you come back to the first reference where you started.
The underline visual indicator is used to highlight navigation references inside the code editor. By default, it has a pink color (which is customizable):
You can also use the Shift+Tab shortcut to navigate backward to the previous reference, or the Escape key to move back to the location where you started. The feature works solution wide, opening a file with a reference if necessary. It also has cross-language support, e.g. if your solution contains projects written in different languages (e.g. C#, C++, VB) and you Tab over a System.Object type reference you might visit all of those projects.
For those who prefer to align code using the white space, the Tab to Next Reference is not available at the very beginning of an identifier or a type references by default, e.g.:
void GetCount(ref int result) { [caret]int count = 100; [caret]result += count; }
“[caret]” is indicating the editor caret position.
In both places the feature will insert the regular tab whitespace character, because this character is often used for source code aligning. If you would like to change this behavior, there is an alternative Tab shortcut binding (disabled by default) that allows the Tab key to take you to the next reference when the caret at the beginning of an identifier or a type reference.
To enable this shortcut, go to the IDE | Shortcuts options page in the CodeRush Options Dialog, find an alternative shortcut binding (Navigation | References | Nav Fields) and check the Enabled check box:
Once it is enabled, to insert whitespace at the beginning of a line of code, you will need to use the Space bar instead of the Tab key, or move the editor caret to the left, so there’s at least one whitespace character to the right of the editor caret.
Color Options
To tweak the color of the underline highlighting, you can go to the Editor | Painting | Navigation Fields options page in the Options Dialog:
Behavior Options
The options specific to the Tab to Next Reference feature are located on the Editor | Navigation | Tab to Next Reference options page:
Available options are:
- Suppress availability when the caret is at the start of field declarations
If checked, Tab to Next Reference won’t be available at the start of a name of a field declaration, and hitting the Tab key will insert a regular whitespace character. Here’s a sample code with a caret position which is implied in the option:
class Test { int [caret]MyField; }
This option is useful if you prefer to align your code in the following way:
class Test { int Height; int Width; double Weight; string Name; }
- Visualize references search
Shows a small hint with a progress bar while the references search is in progress. In most cases, you won’t notice a hint, because references search is ultra-fast and takes only milliseconds.
- Navigate into designer code
If checked, Tab to Next Reference will skip references in designer-generated code inside “*.Designer.*” files.
Notes
The Tab to Next Reference feature relies upon the DXCore‘s background parse, and may not be available for a few seconds after a solution is opened. In this case, if you press Tab on an identifier before the background parse is complete, you will get a regular tab whitespace character inserted at the editor caret position instead of the expected feature behavior. You can encounter such behavior only in rare cases for very large projects with thousands of files. When the background parsing is in progress, you can see the “Processing solution items…” hint:
If you don’t see this hint, it is safe to use any CodeRush features as well as the Tab to Next Reference.
—– Products: CodeRush Pro, CodeRush Xpress Versions: 11.1 and up VS IDEs: any Updated: Aug/30/2011 ID: C105
Fatal error: Uncaught Error: Call to undefined function eregi_replace() in H:\root\home\megazoid-001\www\skorkincom\wp-content\plugins\bbcomments\BBComments.php:41 Stack trace: #0 H:\root\home\megazoid-001\www\skorkincom\wp-includes\class-wp-hook.php(289): render_comment() #1 H:\root\home\megazoid-001\www\skorkincom\wp-includes\plugin.php(212): WP_Hook->apply_filters() #2 H:\root\home\megazoid-001\www\skorkincom\wp-includes\comment-template.php(1028): apply_filters() #3 H:\root\home\megazoid-001\www\skorkincom\wp-content\themes\inove\functions.php(1163): comment_text() #4 H:\root\home\megazoid-001\www\skorkincom\wp-includes\class-walker-comment.php(179): custom_comments() #5 H:\root\home\megazoid-001\www\skorkincom\wp-includes\class-wp-walker.php(144): Walker_Comment->start_el() #6 H:\root\home\megazoid-001\www\skorkincom\wp-includes\class-walker-comment.php(139): Walker->display_element() #7 H:\root\home\megazoid-001\www\skorkincom\wp-includes\class-wp-walker.php(332): Walker_Comment->display_element() #8 H:\root\home\me in H:\root\home\megazoid-001\www\skorkincom\wp-content\plugins\bbcomments\BBComments.php on line 41