The Visual Studio editor has a very useful incremental search feature built in. Let’s try it out.
- Create a new Windows Application project.
- Open up the Form1.Designer.cs file in the editor.
- CTRL + I (this activates Incremental search mode)
- Type: “disp” (without the quotes)
- The selection should have moved to the first match of “disp” in the file.
- Type CTRL + I again. This moves you to the next match.
- CTRL + SHIFT + I moves you to the previous match.
- BACKSPACE removes the last character from the search string.
- ESC cancels incremental search mode.
There’s a great feature hidden in the Find Window Combo Box that is part of the standard Toolbar in Visual Studio.
- Open Visual Studio
- CTRL + N (Create a new file) choose “HTML Page”
- Position the cursor on the tag
- Press CTRL + /
- The focus should have shifted to the Find Combo Box
- Type >
- Now type E
- Cool! It’s a command line with built in Intellisense.
- Type dit.LineT
- The entry for Edit.LineTranspose should be selected
- Press enter
You’ll notice that the and tags are now transposed. Take a few minutes to look around at what commands are available in this list. You can browse the list by entering one letter at a time. For example “>a” to see all the items that begin with a.
This is a great way to quickly execute commands that aren’t mapped to convenient keyboard shortcuts.