Technology Sharing

Visual Studio Common Shortcuts

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Table of Contents

Overview

Using shortcut keys can improve development efficiency. This article summarizes some commonly used Visual Studio shortcut keys.

1. File Operation

Ctrl + O: Open a file

Ctrl + S: Save the file

Ctrl + Shift + S: Save All

Ctrl + N: Create a new file

Ctrl + Shift + N: Create a new project

Ctrl + W: Close the current window

Ctrl + Shift + W: Close all windows

Ctrl + Tab: Switch between open files

Ctrl + Shift + Tab: Switch between open files

2. Editing Operations

Ctrl + X: Cut

Ctrl + C: Copy

Ctrl + V: Paste

Ctrl + A: Select all

Ctrl + Z: Undo

Ctrl + Y: Redo

Ctrl + F: Find

Ctrl + H: Replace

F12: Go to definition

Ctrl + F12: Find all references

Shift + F12: Find current reference

Comment and uncomment

  • Ctrl + K + C: Comment selected text
  • Ctrl+K+U: Uncomment the selected text

Indentation and formatting

  • Tab: Indent the selected text to the right
  • Shift + Tab: Indent the selected text to the left

Ctrl + K + F: Automatically format code

Case conversion

  • Ctrl + Shift + U: Select uppercase to lowercase

  • Ctrl + U: Select lowercase to uppercase

Ctrl + G: Jump to a line

Positioning to the beginning and end of a line

  • Home: Position to the beginning of the current line

  • End: Position to the end of the current line

  • Ctrl + Home: Go to the beginning of the file

  • Ctrl + End: Go to the end of the file

  • Shift + Home: Select the code from the cursor to the beginning of the line

  • Shift + End: Select the code from the cursor to the end of the line

Ctrl + Enter: Insert a line above the line where the cursor is located

Ctrl + Shift + Enter: Insert a line below the line where the cursor is located

3. Debugging Operation

F5: Start debugging

Shift + F5: Stop debugging

F9: Set or clear a breakpoint. The breakpoint line will not be executed.

F10: Step through code

F11: Step into function

Shift + F11: Step out of function

Ctrl + Alt + Q: Quick View

Ctrl + Alt + P: Auto Window

Ctrl + Alt + V: Variables window

4. View Operation

Ctrl + Shift + F: Search in all files

Ctrl+Shift+L: Find option in Solution Explorer

Ctrl+Shift+B: Build Solution

Ctrl + E: Search window

Ctrl + Alt + L: Open the Error View window

Ctrl + Alt + O: Open the Class View window

Ctrl + Alt + M: Open the Object Browser window

Ctrl + Alt + X: Open the Quick Launch window

Ctrl + Tab: Switch between open windows

Ctrl + Shift + Tab: Cycle through open windows

Shift + Alt + Enter: Full screen display

Esc: Exit full screen display