Also available:
Opening Files
- "open stream decks storage"
- "open streaming deck service"
- "open deck storage service"
Showing Tool Windows
- "show me Call Stack"
- "show me Locals"
- "show me Watch 3"
- "show me Parallel Watch 2"
- "show me Immediate"
- "show me Solution Explorer"
- "show me Properties"
- "show me Threads"
- "show me Modules"
Navigating Types and Members
To jump to any member in the active class, say "member" followed by the name of the member.
To jump to any type in the solution, say "type" followed by the name of the type.
Bookmarks
You can drop a permanent named bookmark anywhere in the code and return to it laters by voice. To drop a bookmark, hold down the left Ctrl key and say “Bookmark” followed by the name of the bookmark. For example:
"bookmark storage"
Later, to return to that bookmark, hold down the left Ctrl key and say “Go to” followed by the same name of the bookmark. For example:
"go to storage"
Other Voice Commands
- "copy file path" - copies the full path of the active file to the clipboard.
- "open containing folder" (or "file location") - opens the folder containing the active document in a new instance of Windows Explorer.
- "new folder" - adds a new folder to the project (in the same folder containing the active document).
- "add class" - adds a new item to the project
- "add existing item" - adds an existing item to the project
- "project properties" - opens the properties window for the active project
- "filter solution explorer" - activates the Solution Explorer's search filter TextBox (you can then hold down the right Ctrl key a say the filter you want to use)
- "repeat last test run" - repeats the last test run in the last mode it was run under (e.g., debug or normal)
- "run this" - runs the active test case (or runs all the test cases in the active test class)
- "debug this" - debugs the active test case
- "implementations" - navigates to implementations of the active interface member
- "full screen" - toggles full screen mode
- "NuGet packages" - brings up the NuGet package manager for the solution
- "show me CodeRush test runner" - brings up the CodeRush Test Runner tool window
- "DevExpress" - opens up the devexpress.com web site.
Custom Voice Commands
You can create your own voice commands on the CodeRush Voice Commands options page. You can also edit/delete/enable/disable existing voice commands on this page.
You can get to this page quickly from the CodeRush | Voice Commands... menu item (this options page is in the IDE/Cognitive options folder).
Creating a New Folder for Your Voice Commands
Enter a folder name, and check the "Make this a top level folder" checkbox.
Click OK.
Adding a New Voice Command
Click the New Voice Command button at the top left.
First, decide the words you want to say to execute the command. For this example, we'll create a new Voice Command that applies code changes during debugging (invoking the Visual Studio command "Debug.ApplyCodeChanges"). In this case we might want to trigger this command with two different phrases:
- "apply code changes"
- "hot reload"
For the words to say, we can use a pipe symbol to separate equivalent alternatives. So in this field we could enter "apply code changes | hot reload".
If you have supplied an OpenAI API key, you may want to check the "Allow Semantic Equivalents" checkbox. In this example, it would allow you to invoke the command by saying "let's apply these awesome code changes" or "it's time to reload at super high temperature". This means you won't have to recall the specific words of the command - just the essence of what you want to do. Checking this checkbox will send any spoken phrase that is not perfectly matched to OpenAI to get the inferred match.
Choose the command to bind to this new Voice Command. The combobox on this page lists all CodeRush commands. If you want to bind to a Visual Studio command (like “Edit.Copy”), simply enter it here. You can find a complete list of Visual Studio commands in the Visual Studio Options dialog on the Keyboard & Shortcuts page. For our example, let's enter Debug.ApplyCodeChanges.
You can leave the Parameters textbox empty (some CodeRush commands can take additional parameters).
The last option for our Voice Command is Context, which lets you determine when this voice command is available. Specifying context is generally a good idea because it can improve performance, increase accuracy, and shorten the prompt sent to OpenAI when Allow Semantic Equivalents is turned on. For this example command, it only makes sense to invoke it when actively debugging. To add a context, click the "..." button to the right of the Context TextBox. The Select Context Provider dialog will appear.
In the filter dialog at the top, enter "Debug" and click the System\DebugMode context. This context is true when you are debugging in Visual Studio: