Text Manipulation Shortcut Keys, Visual C# Scheme
The following shortcut key combinations can be used in text editors to delete, move, or format text in an open document.
Note
When you select Visual C# Development Settings in the Import and Export Settings Wizard, the Visual C# 2005 keyboard mapping scheme is applied. Visual C# 2005 is the current keyboard mapping scheme. This is the keyboard mapping scheme that is applied to the integrated development environment (IDE) at initial startup. For more information, see How to: Change Select Settings.
To switch to the Visual C# keyboard mapping scheme
On the Tools menu, click Options.
Expand Environment, and then click Keyboard.
Select Visual C# 2005 from the Apply the following application keyboard mapping scheme drop-down list.
Command Name |
Shortcut Keys |
Description |
---|---|---|
Edit.BreakLine |
ENTER |
Inserts a new line. Note In some editors, such as Design view of the HTML Designer, ENTER behaves differently depending on the context. For more information, see the documentation for the editor you are using. |
Edit.CharTranspose |
CTRL + T |
Swaps the characters on either side of the cursor. For example, AC|BD becomes AB|CD. Available only in text editors. |
Edit.CollapseTag |
CTRL + M, CTRL + T |
Hides the selected HTML tag and displays an ellipsis (. . .) instead. You can view the complete tag as a tooltip by putting the mouse pointer over the . . .. |
Edit.CollapseToDefinitions |
CTRL + M, CTRL + O |
Collapses existing regions to provide a high-level view of the types and members in the source file. |
Edit.CommentSelection |
CTRL + E, C |
Inserts // at the start of the current line or every line of the current selection. |
Edit.CompleteWord |
CTRL + K, W or CTRL + SPACE |
Completes the current word in the completion list. |
Edit.CopyParameterTip |
CTRL + SHIFT + ALT + C |
Copies the parameter information displayed by IntelliSense to the Clipboard. |
Edit.DeleteBackwards |
BACKSPACE |
Deletes one character to the left of the cursor. |
Edit.DeleteHorizontalWhitespace |
CTRL + E, \ |
Collapses white space in the selection, or deletes white space adjacent to the cursor if there is no selection. |
Edit.FormatDocument |
CTRL +E, D |
Formats the current document according to the indentation and code formatting settings specified on the Formatting pane under Tools | Options | TextEditor | C#. |
Edit.FormatSelection |
CTRL + E, F |
Formats the current selection according to the indentation and code formatting settings specified on the Formatting pane under Tools | Options | TextEditor | C#. |
Edit.GenerateMethodSub |
CTRL + K, M |
Creates a new method declaration for the method call that the cursor is resting in. For more information, see Generate Method Stub. |
Edit.HideSelection |
CTRL + M, CTRL + H |
Hides the selected text. A signal icon marks the location of the hidden text in the file. |
Edit.InsertTab |
TAB |
Indents the line of text a specified number of spaces. |
Edit.InsertSnippet |
CTRL + K, X |
Displays the Code Snippet Picker. The selected code snippet will be inserted at the cursor position. For more information, see Code Snippets (C#). |
Edit.LineCut |
CTRL + L |
Cuts all selected lines, or the current line if nothing has been selected, to the Clipboard. |
Edit.LineDelete |
CTRL + SHIFT + L |
Deletes all selected lines, or the current line if no selection has been made. |
Edit.LineOpenAbove |
CTRL + ENTER |
Inserts a blank line above the cursor. |
Edit.LineOpenBelow |
CTRL + SHIFT + ENTER |
Inserts a blank line below the cursor. |
Edit.LineTranspose |
SHIFT + ALT + T |
Moves the line that contains the cursor below the next line. |
Edit.ListMembers |
CTRL + J, CTRL + K, L |
Invokes the IntelliSense completion list. |
Edit.MakeLowercase |
CTRL + U |
Changes the selected text to lowercase characters. |
Edit.MakeUppercase |
CTRL + SHIFT + U |
Changes the selected text to uppercase characters. |
Edit.OverTypeMode |
INSERT |
Toggles between insert and overtype insertion modes. Available only when you are working in text editors. |
Edit.ParameterInfo |
CTRL + SHIFT + SPACEBAR or CTRL + K, P |
Displays the name, number, and type of parameters required for the specified method. |
Edit.PasteParameterTip |
CTRL + SHIFT + ALT + P |
Pastes the previously copied parameter information from IntelliSense to the location indicated by the cursor. |
Edit.StopHidingCurrent |
CTRL + M, CTRL + U |
Removes the outlining information for the currently selected region. |
Edit.StopOutlining |
CTRL + M, P |
Removes all outlining information from the whole document. |
Edit.SwapAnchor |
CTRL + E, A |
Swaps the anchor and end points of the current selection. |
Edit.TabLeft |
SHIFT + TAB |
Moves selected lines to the left one tab stop. |
Edit.ToggleAllOutlining |
CTRL + M, L |
Toggles all previously collapsed outlining regions between collapsed and expanded states. |
Edit.ToggleOutliningExpansion |
CTRL + M, M |
Toggles the currently selected collapsed region between the collapsed and expanded state. |
Edit.ToggleTaskListShortcut |
CTRL + E, T |
Sets or removes a shortcut at the current line. |
Edit.ToggleWordWrap |
CTRL +E, W |
Enables or disables wordwrap in an editor. |
Edit.UncommentSelection |
CTRL + E, U |
Removes the comment syntax from the current line of code. |
Edit.ViewWhiteSpace |
CTRL + E, S - or - CTRL + R, CTRL + W |
Shows or hides spaces and tab marks. |
Edit.WordDeleteToEnd |
CTRL + DELETE |
Deletes the word to the right of the cursor. |
Edit.WordDeleteToStart |
CTRL + BACKSPACE |
Deletes the word to the left of the cursor. |
Edit.WordTranspose |
CTRL + SHIFT + T |
Transposes the words on either side of the cursor. For example, |End Sub would be changed to read Sub End|. |