You are on page 1of 2

Microsoft Visual C# Default Key Bindings

® ®

Editing Edit.Toggle- CTRL + ALT + Toggles between suggestion mode Edit.GoToDefinition F12 Navigates to the declaration for the
CompletionMode SPACEBAR (all commit characters except for selected symbol in code.
Edit.CollapseTo- CTRL + M, O Collapses declaration bodies to tab leave entered text as-is, tab
Definitions provide a high-level view of the chooses a completion item in the Edit.GoToNext- F8 Moves the caret to the next item,
types and members in the source list) and completion mode. Location such as a task in the Task List
file. window or a search match in the
Edit.<Direction> SHIFT + ALT + Creates a box selection instead of a Find Results window. Subsequent
Edit.HideSelection CTRL + M, CTRL + H Collapses current selection to an ExtendColumn <ARROW KEY> stream selection. invocations will move to the next
outlining region. item in the list.

CTRL + M, L Toggles all previously collapsed Edit.Incremental- CTRL + I Activates incremental search. If
Edit.ToggleAll-
Outlining outlining regions between
File Search incremental search is on, but no
collapsed and expanded states. File.NewProject CTRL + SHIFT + N Displays the New Project dialog input is passed, the previous search
box. query is used. If search input has
Edit.Toggle- CTRL + M, M Toggles the currently selected been found, next invocation
OutliningExpansion collapsed region between the File.OpenProject CTRL + SHIFT + O Displays the Open Project dialog searches for the next occurrence of
collapsed and expanded state. box, where existing projects can be the input text.
added to the solution.
Edit.StopOutlining CTRL + M, P Removes all outlining information Edit.FindNext, F3 and SHIFT + F3 Searches again for the last search
from the whole document. Project.AddClass SHIFT + ALT + C Displays the Add New Item dialog Edit.FindPrevious pattern in the direction specified.
box and selects Class template as
Edit.Comment- CTRL + K, C or Inserts // at the beginning of the default. Edit.FindNext- CTRL + F3 and Sets the search pattern to the
Selection CTRL + E, C current line or every line of the Selected, CTRL + SHIFT + F3 selected text, then search in the
current selection. Project.Add- SHIFT + ALT + A Displays the Add Existing Item Edit.FindPrevious- direction specified.
ExistingItem dialog box, where existing files can Selected
Edit.Uncomment- CTRL + K, U or Removes the // at the beginning of be added to the current project.
Selection CTRL + E, U the current line or every line of the View.Forward- CTRL + SHIFT + 7 Moves to the next item called in
current selection. Project.Add- CTRL + SHIFT + A Displays the Add New Item dialog BrowseContext code in the current file. Uses the Go
NewItem box, where a new file can be added To Definition navigation stack.
Edit.Format- CTRL + K, D or Formats the current document to the current project.
Document CTRL + E, D according to the indentation and View.PopBrowse- CTRL + SHIFT + 8 Moves to the previous item called in
code formatting settings specified Window.ShowEz- CTRL + ALT + Displays a pop-up listing of all open Context code in the current file. Uses the Go
on the Formatting pane under MDIFileList DOWN ARROW documents. To Definition navigation stack.
Tools | Options | Text Editor | C#.
View.Navigate- CTRL + HYPHEN (-) Moves to the previously browsed
Edit.Format- CTRL + K, F or Formats the current selection Backward line of code.
Selection CTRL + E, F according to the indentation and IntelliSense
code formatting settings specified View.Navigate- CTRL + SHIFT + Moves to the next browsed line of
Edit.CompleteWord CTRL + SPACEBAR Completes the current word in the
on the Formatting pane under Forward HYPHEN (-) code.
or CTRL + K, W completion list.
Tools | Options | Text Editor | C#.
Edit.FindInFiles CTRL + SHIFT + F Displays the Find in Files tab of the
Edit.ListMembers CTRL + J or Invokes the IntelliSense®
Edit.InsertSnippet CTRL + K, X Displays the Code Snippet Picker. Find and Replace dialog box.
CTRL + K, L completion list.
The selected code snippet will be
inserted at the caret position. Edit.FindSymbol ALT + F12 Displays the Find Symbol pane of
Edit.QuickInfo CTRL + K, I Displays the complete declaration
the Find and Replace dialog box.
for the specified identifier in your
Edit.SurroundWith CTRL + K, S Displays the Code Snippet Picker. code in a Quick Info tooltip.
The selected code snippet will be View.ViewCode F7 Displays the selected item in Code
wrapped around the selected text. view of the editor.
Edit.ParameterInfo CTRL + SHIFT + Displays the name, number, and
SPACEBAR or type of parameters required for the View.ViewDesigner, SHIFT + F7 Switches between Design and
Edit.InvokeSnippet- TAB Inserts the expanded code snippet CTRL K, P specified method.
FromShortcut from the shortcut name. View.ViewMarkup Source views for the current
document
Make Completion CTRL Causes a visible completion list to
Edit.Cycle- CTRL + SHIFT + V Pastes text from the Clipboard ring List Transparent become transparent.
ClipboardRing to the caret location in the file. Window.MoveTo- CTRL + F2 Moves focus to the drop-down bar
Subsequent use of the shortcut key NavigationBar located at the top of the editor
iterates through the items in the when the editor is in Code view or
Clipboard ring. Navigation Server Code view.

Edit.Replace CTRL + H Displays the replace options in the Edit.NavigateTo CTRL + COMMA (,) Displays the NavigateTo window, Edit.Find CTRL + F Displays the Find Quick tab of the
Quick Replace tab of the Find and which allows quick navigation to Find and Replace dialog box.
Replace dialog box. files, types, and members. The word
at the caret seeds the search. Edit.GoTo CTRL + G Displays the Go to Line dialog box.
Edit.ReplaceInFiles CTRL + SHIFT + H Displays the replace options on the Edit.GoToFind- CTRL + / Moves focus to the Find/Command
Replace in Files tab of the Find Edit.FindAll- SHIFT + F12 or Displays a list of all references for
References CTRL + K, R the symbol selected. Combo box on the Standard toolbar.
and Replace dialog box.

View.Show- CTRL + PERIOD (.) Displays the available options on Edit.GoToBrace CTRL + ] Moves the caret location to the
SmartTag or SHIFT + ALT + F10 the Smart Tag menu. matching brace in the source file.

VS KB Brochure C#_A4.indd 2 7/2/10 3:57 PM


EditorContext- CTRL + K, T Brings focus to the Call Hierarchy Debugging Refactoring
Menus.Code- window using the member at the
Window.ViewCall- caret as a top-level node. Debug.Autos CTRL+D, A Displays the Autos window, which CodeRush Xpress is a free plug-in from Developer
Hierarchy displays variables used in the current line Express Inc., in partnership with Microsoft. CodeRush
of code and the preceding line of code. Xpress supports more than 50 refactoring features. See
Edit.NextHigh- CTRL + SHIFT + Moves the caret to the next or www.devexpress.com/Products/Visual_Studio_Add-
lightedReference, DOWN ARROW previous highlighted identifier Debug.CallStack CTRL+D, C Displays the Call Stack window, in/CodeRushX/ for more information.
Edit.PreviousHigh- and CTRL + SHIFT matching the current one. which displays a list of all active
lightedReference + UP ARROW methods or stack frames for the Refactor.- CTRL + R, E Displays the Encapsulate Field
current thread of execution. EncapsulateField dialog box, which allows creation
of a property from an existing field
Window Debug.Immediate CTRL+D, I Displays the Immediate window, and updates all references to use
where expressions can be evaluated. the new property.
View.ClassView CTRL + W, C Displays the Class View window.
Debug.Locals CTRL+D, L Displays the Locals window, which Refactor.Extract- CTRL + R, I Displays the Extract Interface
View.Code- CTRL + W, D Displays the Code Definition displays the local variables and their Interface dialog box, which allows creation
DefinitionWindow window. values for each method in the of a new interface with members
current stack frame. derived from an existing class,
View.ErrorList CTRL + W, E Displays the Error List window. struct, or interface.
Debug.QuickWatch CTRL+D, Q Displays the QuickWatch dialog
View.ObjectBrowser CTRL + W, J Displays the Object Browser. box that has the current value of Refactor.Extract- CTRL + R, M Displays the Extract Method dialog
the selected expression. Method box, which allows creation of a new
View.Output CTRL + W, O Displays the Output window, where
status messages can be viewed at method from the selected code.
Debug.Start F5 Launches the application under the
run time. debugger based on the settings from Refactor.Remove- CTRL + R, V Displays the Remove Parameters
the startup project. When in Break Parameters dialog box, which allows removal of
View.Properties- CTRL + W, P Displays the Properties window, mode, invoking this command will run
Window which lists the design-time parameters from methods, indexers,
the application until the next breakpoint. or delegates by changing the
properties and events for the
currently selected item. declaration at any locations where
Debug.Start- CTRL+F5 Launches the application without
the member is called.
WithoutDebugging invoking the debugger.
View.Solution- CTRL + W, S Displays Solution Explorer, which
Explorer lists the projects and files in the Refactor.Rename CTRL + R, R or F2 Displays the Rename dialog
Debug.StepInto F11 Executes code one statement at
current solution. box, which allows renaming all
a time, following execution into
references for an identifier.
method calls.
View.TaskList CTRL + W, T Displays the Task List window,
which displays custom tasks, Refactor.Reorder- CTRL + R, O Displays the Reorder Parameters
Debug.Step- SHIFT+ALT+F11 Prompts to select which sub
comments, shortcuts, warnings, and Parameters dialog box, which allows changes
IntoSpecific expression to step into, regardless
error messages. to the order of the parameters for
of the tools options setting for
methods, indexers, and delegates.
skipping properties and operators.
View.Toolbox CTRL + W, X Displays the Toolbox, which
contains controls that can be Refactor! CTRL + Invokes available Developer Express
Debug.StepOut SHIFT+F11 Executes the remaining lines of
included or used with your code. BACKQUOTE (`) Inc. refactorings when it is installed.
a method in which the current
execution point is located.
View.ServerExplorer CTRL + W, L Displays Server Explorer, which lets
you view and manipulate database Debug.StepOver F10 Executes the next line of code, but Build
servers, event logs, message does not follow execution through
queues, Web services, and other any method calls. Build.BuildSolution F6 or Builds all the projects in the
operating system services. CTRL+SHIFT+B solution.
Debug.Stop- SHIFT+F5 Stops running the current
Window.CloseTool- SHIFT + ESC Closes the current tool window. Debugging application under the debugger. Build.BuildSelection SHIFT+F6 Builds the selected project and its
Window dependencies.
Debug.Toggle- F9 Sets or removes a breakpoint at
Data.ShowData- SHIFT + ALT + D Displays the Data Sources window. Breakpoint the current line. Note: You can choose to use these key bindings from the Visual
Sources
Debug.Watch CTRL+D, W Displays the Watch window, which C# Development Settings. To change these settings, go to Tools
Window.Close- CTRL + F4 Closes the current tab. displays the values of selected | Import and Export Settings... and select Reset All Settings.
DocumentWindow variables or watch expressions. Then select Visual C# Development Settings. You could also
Window.NextDocu- CTRL + TAB Displays the IDE Navigator, with Debug.Enable- CTRL+F9 Toggles the breakpoint between import only the key bindings by selecting Import Selected
mentWindowNav the first document window selected. Breakpoint disabled and enabled. Environment Settings instead of Reset All Settings. To
[CTRL] Causes a visible datatip to become
customize individual key bindings, go to Tools | Options |
View.CallHierarchy CTRL + W, K Displays the Call Hierarchy Make Datatip
window, which lists callers and Transparent transparent. Environment | Keyboard.
callees for a given member.
Test.RunTestsIn- CTRL+R, T Runs the unit test containing
View.ZoomIn, CTRL + SHIFT + Increases (>) or decreases (<) the CurrentContext the caret.
View.ZoomOut PERIOD (.) and size of contents in the editor.
CTRL + SHIFT + Test.RunAllTests- CTRL+R, A Runs all of the unit tests in © 2009 Microsoft Corporation. All rights reserved. Microsoft, IntelliSense, Visual C#,
COMMA (,) InSolution the solution. Visual Studio, and the Visual Studio logos are trademarks of the Microsoft group of
companies. All other trademarks are the property of their respective owners.

VS KB Brochure C#_A4.indd 1 7/2/10 3:57 PM

You might also like