Visual Studio shortcut keys (super full)

Table of contents

Commonly used:

1. Document related

2. Edit search related

3. Navigation view related

4. Project related

Five, generate related

6. Debugging related

Seven, debugging related

Eight, analysis related

Nine, tools related

10. Expansion related

Eleven, window related

12. Help


Commonly used:

  • ctrl + , : search for files or functions or variables or edit -> locate to Note: , corresponds to < on that button
  • c, c commas, not " commas for that key
  • ctrl + g : Navigate to the line or edit -> go to
  • ctrl + - : Return to the previous cursor browsing Note: - is not the key on the small key (number) pad
  • ctrl + +: return to the last cursor browsing Note: the + sign is not the key on the small key (number) pad
  • ctrl + c : copy the line where the cursor is located Note: only need the cursor to be in this line, do not need to select the entire line
  • ctrl + x: cut the line where the cursor is located Note: just move the cursor to the line, do not need to select the entire line
  • ctrl + l (note the L key): delete the line where the cursor is located Note: just move the cursor to the line, do not need to select the entire line
  • ctrl + k + c: comment the selected code or the line where the cursor is located Note: press k first, then c or ctrl+k, ctrl+c
  • ctrl + k + u: uncomment the selected code or the line where the cursor is located Note: press k first, then u or ctrl+k, ctrl+u
  • ctrl + f: find in this file
  • ctrl + h : replace in this file
  • cf2: go to the definition, if you want to find where the Connect function is defined, you can double-click to select it, then f12
  • cshift + f12 : Find all references. If you want to find out where the Connect function is called, you can select Connect, then shift+f12
  • cf5 : start running or start debugging

1. Document related

  • Open file window: Alt + F
  • New project: Ctrl + Shift + N
  • New file: Ctrl + N
  • Open project/solution: Ctrl + Shift + O
  • Open folder: Ctrl + Shift + Alt + O
  • Open website: Shift + Alt + O
  • Open file: Ctrl + O
  • Save a single file: Ctrl + S
  • Save All: Ctrl + Shift + S
  • Print: Ctrl + P
  • Exit: Alt + F4

2. Edit search related

  • Ctrl + Enter = Insert a blank line at the current line
  • Ctrl + Shift + Enter = Insert a blank line below the current line
  • Ctrl + Spacebar = Autocomplete with IntelliSense
  • Alt + Shift + Arrow keys (←,↑,↓,→) = select custom part of code
  • Ctrl + } = match braces, brackets
  • Ctrl + Shift + } = select text within matching brackets, brackets
  • Ctrl + Shift + S = save all files and projects
  • Ctrl+K, Ctrl+C = Comment selected lines
  • Ctrl + K, Ctrl + U = uncomment selected lines
  • Ctrl + K, Ctrl + D = properly align all code
  • Ctrl+D The next match is also selected
  • Ctrl+C , Ctrl+V copy or cut the current line/current selection
  • Enter format code after Shift+Alt+F, or Ctrl+Shift+P to format the code
  • Shift + End = select the entire line from beginning to end
  • Shift + Home = Select entire line from end to beginning
  • Ctrl + Delete = delete all words to the right of the cursor
  • Open the editor window: Alt + E
  • Go to line: Ctrl + G
  • Go to all: Ctrl + T
  • Go to file: Ctrl + Shift + T
  • Go to recent files: Ctrl+1, R
  • Go to type: Ctrl+1, Ctrl+T
  • Go to member: Alt + \
  • Go to symbol: Ctrl+1, Ctrl+S
  • Go to next question in file: Alt + PgDn
  • Go to previous question in file: Alt + PgUp
  • Go to previous edit position: Ctrl + Shift + Backspace
  • Search box: Ctrl + Q
  • Quick Find: Ctrl + F
  • Quick replacement for Ctrl+H
  • Find in files: Ctrl + Shift + F
  • Replace in file: Ctrl + Shift + H
  • Bookmark the current line: Ctrl + K Ctrl + K
  • Navigate to next bookmark: Ctrl + K Ctrl + N 
  • If you type a class name such as Collection<string>, and the namespace import is incorrect, then this shortcut combination will automatically insert the import: Ctrl + . 
  • Find in files: Ctrl + Shift + F
  • Find all references: Shift + F12 
  • Show Find dialog: Ctrl + F 
  • Show replace dialog: Ctrl + H 
  • Jump to line number or line: Ctrl + G 
  • Find the references of the selected entry in the entire solution: Ctrl + Shift + F
  • Undo: Ctrl + Z
  • Redo: Ctrl + Y
  • Cut: Ctrl + X
  • Copy: Ctrl + C
  • Paste: Ctrl + V
  • Show clipboard history: Ctrl + Shift + V
  • Duplicate a line: Ctrl + D
  • Delete: Del
  • Select all: Ctrl + A
  • Format the document: Ctrl + K, Ctrl + D
  • Format selection: Ctrl + K, Ctrl + F
  • Convert to uppercase: Ctrl + Shift + U
  • Convert to lowercase: Ctrl + U
  • Move selected line up: Alt + ↑
  • Move selected row down: Alt + ↓
  • Delete horizontal whitespace: Ctrl+K, Ctrl+\
  • Extend selection to containing block: Shift + Alt + ]
  • Expand Selection: Shift + Alt + =
  • Shrink Selection: Shift + Alt + -
  • View blank: Ctrl + R, Ctrl + W
  • Word wrap: Ctrl + E, Ctrl + W
  • Incremental search: Ctrl + I
  • Toggle line comments: Ctrl + K, Ctrl + /
  • Toggle block comment: Ctrl + Shift + /
  • Annotate selection: Ctrl+K, Ctrl+C
  • Uncomment Selection Ctrl+K, Ctrl+U
  • Switch bookmarks: Ctrl + K, Ctrl + K
  • Previous bookmark: Ctrl + K, Ctrl + P
  • Next bookmark: Ctrl + K, Ctrl + N
  • Clear bookmarks: Ctrl + K, Ctrl + L
  • Previous bookmark in folder: Ctrl+Shift+K, Ctrl+Shift+P
  • Next bookmark in folder: Ctrl+Shift+K, Ctrl+Shift+N
  • Add task list shortcut: Ctrl + K, Ctrl + H
  • Toggle Outlining Expanded: Ctrl+M, Ctrl+M
  • Toggle all outlining: Ctrl+M, Ctrl+L
  • Stop Outlining: Ctrl+M, Ctrl+P
  • Stop hiding current area: Ctrl+M, Ctrl+U
  • Collapse to definition: Ctrl+M, Ctrl+O
  • List members: Ctrl + J
  • Parameter information: Ctrl + Shift + Spacebar
  • Quick info: Ctrl + K, Ctrl + I
  • Complete word: Ctrl + Spacebar
  • Toggle completion mode: Ctrl + Alt + Spacebar
  • Outside code: Ctrl + K, Ctrl + S
  • Insert segment: Ctrl + K, Ctrl + X
  • Insert next matching caret: Shift + Alt + .
  • Insert caret at all matches: Shift + Alt + ;
  • Scroll the window without moving the cursor: Ctrl + Up/Down (arrow keys ↑, ↓)
  • Go to definition: F12
  • Insert a blank line at the current line: Ctrl + Enter
  • Insert a blank line below the current line: Ctrl + Shift + Enter
  • Block selection: Alt + Shift + arrow keys, Shift + arrow keys
  • Select rectangular text: Alt + left mouse button
  • Matching brackets: Ctrl + }
  • Select brackets, text inside brackets: Ctrl + Shift + }
  • Select entire line from beginning to end: Shift + End
  • Select entire line from end to beginning: Shift + Home

3. Navigation view related

  • Open view window: Alt + V
  • Code: F7
  • Solution Explorer: Ctrl + Alt + L
  • Team Explorer: Ctrl + \, Ctrl + M
  • Server Explorer: Ctrl + Alt + S
  • Test Explorer: Ctrl+E, T
  • Bookmark window: Ctrl + K, Ctrl + W
  • Call Hierarchy: Ctrl + Alt + K
  • Class View: Ctrl + Shift + C
  • Code definition window: Ctrl + \, D
  • Object Browser: Ctrl + Alt + J
  • List of errors: Ctrl + \, E
  • Output: Ctrl + Alt + O
  • Task list: Ctrl + \, T
  • Toolbox: Ctrl + Alt + X
  • Notification: Ctrl+\, Ctrl+N
  • Find symbolic interface: Ctrl + Alt + F12
  • Command window: Ctrl + Alt + A
  • Web browser: Ctrl + Alt + R
  • Task Runner Explorer: Ctrl + Alt + Backspace
  • Document Outline: Ctrl + Alt + T
  • Resource View: Ctrl + Shift + E
  • Full screen film: Shift + Alt + Enter
  • All windows: Shift + Alt + M
  • Navigate backwards: Ctrl + -
  • Navigate forward: Ctrl + Shift + -
  • Properties window: F4
  • Property page: Shift + F4
  • Scroll window without moving cursor: Ctrl +Up/Down   
  • Move the cursor to its previous position: Ctrl + -  
  • Let the cursor move to the next position: Ctrl ++  
  • Go to definition: F12 

4. Project related

  • Open project window: Alt + P
  • Class Wizard: Ctrl + Shift + X
  • Add new item: Ctrl + Shift + A
  • Add existing item: Shift + Alt + A

Five, generate related

  • Build solution: Ctrl + Shift + B
  • Analyze the solution run code: Alt + F11
  • Build project: Ctrl + B
  • Compile: Ctrl + F7

6. Debugging related

  • Open the debug window: Alt + D
  • Breakpoint window: Ctrl + Alt + B
  • Exception settings: Ctrl + Alt + E
  • Show Diagnostic Tools: Ctrl + Alt + F12
  • Instant: Ctrl + Alt + I
  • Start graphics debugging: Alt + F5
  • Start debugging: F5
  • Start execution (without debugging): Ctrl + F5
  • Stop debugging: Shift + F5
  • Restart debugging: Ctrl + Shift + F5
  • Performance Profiler: Alt + F2
  • Attach to process: Ctrl + Alt + P
  • Step by statement: F11
  • Step by step: F10
  • Toggle breakpoint: F9
  • Start/stop breakpoint: Ctrl + F9
  • Run to the cursor: Ctrl + F10
  • Function breakpoint: Ctrl + K, B
  • Stop debugging: Shift + F5

Seven, debugging related

  • Open test window: Alt + S
  • Run all tests: Ctrl + R, A
  • Repeat last run: Ctrl + R, L
  • Debug all tests: Ctrl+R, Ctrl+A
  • Debug last run: Ctrl + R, D
  • Test Explorer: Ctrl+E, T
  • Attach to process: Ctrl + Alt + P 
  • Debug stepping: F10
  • Start debugging: F5   
  • Stop debugging: Shift + F5   
  • Add quick match: Ctrl + Alt + Q 
  • Set or remove breakpoints: F9 

Eight, analysis related

  • Open analysis window: Alt + N
  • Run code analysis on a file: Ctrl + Shift + Alt + F7

Nine, tools related

  • Open tool window: Alt + T
  • Code snippet manager: Ctrl + K, Ctrl + B

10. Expansion related

  • Open extension window: Alt + X


Eleven, window related

  • Open window: Alt + W
  • Close: Shift + Esc

12. Help

  • Open the help window: Alt + H
  • View help: Ctrl + F1

Guess you like

Origin blog.csdn.net/qq_43445867/article/details/128791279