Microsoft Visual Studio keyboard shortcuts
The following table lists some useful keyboard shortcuts that you can use while working in Microsoft Visual Studio.
Command | Keyboard shortcut | Function |
---|---|---|
Edit.Copy | Ctrl+C | Copies the selected item to the Clipboard. |
Edit.Cut | Ctrl+X | Deletes the selected item from the file and copies it to the Clipboard. |
Edit.Paste | Ctrl+V | Inserts the Clipboard contents at the cursor. |
Edit.Undo | Ctrl+Z | Reverses the last editing action. |
Edit.WordNext | Ctrl+Right arrow | Moves the cursor one word to the right. |
Edit.WordNextExtend | Ctrl+Shift+Right arrow | Extends the selection one word to the right. |
Edit.Find | Ctrl+F | Displays the Quick tab of the Find and Replace dialog box. |
Edit.FindinFiles | Ctrl+Shift+F | Displays the In Files tab of the Find and Replace dialog box. |
Edit.FindNext | F3 | Finds the next occurrence of the search text. |
Edit.FindPrevious | Shift+F3 | Finds the previous occurrence of the search text. |
Edit.FindNextSelected | Ctrl+F3 | Finds the next occurrence of the currently selected text, or the word at the cursor. |
Edit.FindPreviousSelected | Ctrl+Shift+F3 | Finds the previous occurrence of the currently selected text, or the word at the cursor. |
Edit.CollapseAllOutlining | Ctrl+M, Ctrl+A | Collapses all regions on the page to show only the outermost groups in the hierarchy; typically the using/imports section and the namespace definition. |
Edit.ExpandAllOutlining | Ctrl+M, Ctrl+X | Expands all collapsed regions on the page. |
Edit.CommentSelection | Ctrl+K, Ctrl+C | Applies comment characters for the current language to the current selection. |
Edit.UncommentSelection | Ctrl+K, Ctrl+U | Removes the comment syntax from the current line of code. |
Edit.CompleteWord | Ctrl+Space | Completes the current word in the completion list. |
Edit.FormatDocument | Ctrl+K, Ctrl+D | Formats the current document according to the indentation and code formatting settings specified on the Formatting pane in the Options dialog box, for the current language. |
Edit.FormatSelection | Ctrl+K, Ctrl+F | Formats the current selection according to the indentation and code formatting settings specified on the Formatting pane in the Options dialog box, for the current language. |
Edit.InsertSnippet | Ctrl+K, Ctrl+X | Displays the Code Snippet Picker. The selected code snippet will be inserted at the cursor position. |
Edit.MakeLowercase | Ctrl+U | Changes the selected text to lowercase characters. |
Edit.MakeUppercase | Ctrl+Shift+U | Changes the selected text to uppercase characters. |
Edit.ViewWhiteSpace | Ctrl+E, Ctrl+S | Shows or hides spaces and tab marks. |
Window.NextDocumentWindowNav | Ctrl+Tab | Displays the IDE Navigator, with the first document window selected. |