Text Manipulation Shortcut Keys, Visual C++ 6.0 Default Shortcut Option
Use the following shortcut key combinations in text editors to delete, move, and format text in an open document.
Note
The appearance of features in the IDE can depend on your active settings or edition, and might differ from those described in Help. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.
Note
To see a list of shortcut keys that have changed or are no longer supported in Visual C++ .NET, see Obsolete Visual C++ 6.0 Key Commands and Changes to Visual C++ 6.0 Key Commands.
Command name |
Shortcut keys |
Description |
---|---|---|
Edit.BreakLine |
ENTER SHIFT + ENTER |
Inserts a new line. |
Edit.CharTranspose |
CTRL + T |
Swaps the characters on either side of the insertion point. For example, AC|BD becomes AB|CD. Available only in text editors. |
Edit.ClearBookmarks |
CTRL + SHIFT + F2 CTRL + K, CTRL + L |
Removes all unnamed bookmarks in the current document. |
Edit.CollapsetoDefinitions |
CTRL + M, CTRL + O |
Automatically determines logical boundaries for creating regions in code, such as procedures, and then hides them. |
Edit.CommentSelection |
CTRL + K, CTRL + C |
Marks the current line of code as a comment, using the correct comment syntax for the programming language. |
Edit.CompleteWord |
CTRL + SPACE ALT + RIGHT ARROW |
Displays Word Completion based on the current language. |
Edit.Delete |
DELETE |
Deletes one character to the right of the cursor. |
Edit.DeleteBackwards |
BACKSPACE SHIFT + BACKSPACE |
Deletes one character to the left of the cursor. |
Edit.DeleteHorizontalWhiteSpace |
CTRL + K, CTRL + \ |
Collapses white space in the selection, or deletes white space adjacent to the cursor if no selection. |
Edit.FormatDocument |
CTRL + K, CTRL + D |
Applies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog box. |
Edit.FormatSelection |
ALT + F8 CTRL + K, CTRL + F |
Correctly indents the selected lines of code based on the surrounding lines of code. |
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, such as five. |
Edit.LineCut |
CTRL + L SHIFT + ALT + 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 insertion point. |
Edit.LineOpenBelow |
CTRL + SHIFT + ENTER |
Inserts a blank line below the insertion point. |
Edit.LineTranspose |
SHIFT + ALT + T |
Moves the line containing the insertion point below the next line. |
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 working in text editors. |
Edit.StopHidingCurrent |
CTRL + M, CTRL + U |
Removes the outlining information for the currently selected region. |
Edit.StopOutlining |
CTRL + M, CTRL + P |
Removes all outlining information from the entire document. |
Edit.SwapAnchor |
CTRL + R, CTRL + P |
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, CTRL + L |
Toggles all previously marked hidden text sections between hidden and display states. |
Edit.ToggleBookmark |
CTRL + F2 CTRL + K, CTRL + K |
Sets or removes a bookmark at the current line. |
Edit.ToggleOutliningExpansion |
CTRL + M, CTRL + M |
Toggles the currently selected hidden text section between the hidden and display state. |
Edit.ToggleTaskListShortcut |
CTRL + K, CTRL + H |
Sets or removes a shortcut at the current line. |
Edit.ToggleWordWrap |
CTRL + R, CTRL + R |
Enables or disables word wrap in an editor. |
Edit.UncommentSelection |
CTRL + K, CTRL + U |
Removes the comment syntax from the current line of code. |
Edit.ViewWhiteSpace |
CTRL + SHIFT + 8 CTRL + R, CTRL + W |
Shows or hides spaces and tab marks. |
Edit.WordDeleteToEnd |
CTRL + DELETE |
Deletes the word to the right of the insertion point. |
Edit.WordDeleteToStart |
CTRL + BACKSPACE |
Deletes the word to the left of the insertion point. |
Edit.WordTranspose |
CTRL + SHIFT + T |
Transposes the words on either side of the insertion point. For example, main int would be changed to read int main. |
See Also
Tasks
How to: Work with Keyboard Shortcuts
Concepts
Pre-defined Keyboard Shortcuts