Freigeben über


Tips and Tricks for Visual Studio

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

You can navigate in Visual Studio more easily by using the shortcuts in this topic. For more general information, see Keyboard Shortcuts in Visual Studio. For information about how to optimize Visual Studio for accessibility, see Accessibility Tips and Tricks.

Window Management

Command Shortcut
Drag Off Floating Tab Wells Ctrl+click for multi-select
Maximize Floating Window Double-click on title bar
Re-dock Floating Window Ctrl+double-click title bar
Close Active Document Ctrl+F4
Show Open File List Ctrl+Alt+Down
Show All Floating Windows Ctrl+Shift+M

Window Shortcuts

Command Shortcut
Move/Dock Floating Windows Win+Left / Win+Right
Maximize/Minimize Windows Win+Up / Win+Down
Show Jump List Win+Alt+n
Start New Instance Win+Shift+n
Switch Between Windows Win+n
Command Shortcut
Solution Explorer Search Ctrl+;
Place Focus in Search box in any tool window Alt+` when the tool window has focus
Quick Launch Ctrl+Q
Quick Launch Scope Results - @opt Options
- @cmd Commands
- @mru Most recently used
- @doc Open documents
Search in Tools Options Ctrl+E

Editor Find

Command Shortcut
Quick Find Ctrl+F
Quick Find Next Result Enter
Quick Find Previous Result Shift+Enter
Quick Find Expand Drop Down Alt+Down
Dismiss Find Esc
Quick Replace Ctrl+H
Quick Replace Replace Next Alt+R
Quick Replace Replace All Alt+A
Find in Files Ctrl+Shift+F
Replace in Files Ctrl+Shift+H

Code Editor

Command Shortcut
IntelliSense Suggestion Mode Ctrl+Alt+Space (Toggle)
Force Show IntelliSense Ctrl+J
Smart Tags Ctrl+.
Snippet Picker Ctrl+K,X or ?,Tab (VB)
Surround With Ctrl+K,S
Show Quick Info Ctrl+K,I
Navigate To Ctrl+,
Go To Definition F12
Peek Definition Alt+F12
Go To Definition Stack Ctrl+Shift+8 (Back), Ctrl+Shift+7 (Forward)
Navigate Highlighted References Ctrl+Shift+Up (Previous), Ctrl+Shift+Down (Next)
Editor Zoom Ctrl+Shift+> (In), Ctrl+Shift+< (Out)
Block Selection Hold Alt and drag mouse, Shift+Alt+Arrow Keys
Move Line Up/Down Alt+Up / Alt+Down
Peek Definition Alt+F12
Close the Peek Definition window Esc
Promote the Peek Definition window to a regular document tab Ctrl+Alt+Home
Navigate between multiple Peek Definition windows Ctrl+Alt+- and Ctrl+Alt+=
Navigate between multiple Peek results F8 and Shift+F8
Toggle between the code editor window and the Peek Definition window Shift+Esc

Toolbars

Command Shortcut
Add Buttons Click toolbar overflow button
Find Combo in Standard toolbar Ctrl+D
Find Textbox Command Mode Type “>”
Create new alias >alias NewAlias Command

Debugging

Command Shortcut
Start Debugging F5
Stop Debugging Shift+F5
Restart Debugging Ctrl+Shift+F5
Step Over F10
Step Into F11
Step Out Shift+F11
Run To Cursor Ctrl+F10
Set Next Statement Ctrl+Shift+F10
Set and Toggle Breakpoint F9
Disable Breakpoint Ctrl+F9
Immediate Window Ctrl+Alt+I
Immediate Window Command Mode Type “>”
Immediate Window Clear Buffer >cls
Immediate Window Print Value ?varname

Application Lifecycle Management

See Keyboard shortcuts: Visual Studio Online, TFS web portal, and Team Explorer.

See Also