Upload
ryan-evans
View
219
Download
0
Embed Size (px)
Citation preview
8/2/2019 Vs KB Brochure CSharp Letter HiRez
1/2
MicrosoftVisual C#Default Key Bindings
Editing
Edit.CollapseTo-Definitions
CTRL + M, O Collapses declaration bodies toprovide a high-level view of thetypes and members in the sourcefile.
Edit.HideSelection CTRL + M, CTRL + H Collapses current selection to anoutlining region.
Edit.ToggleAll-Outlining
CTRL + M, L Toggles all previously collapsedoutlining regions betweencollapsed and expanded states.
Edit.Toggle-OutliningExpansion
CTRL + M, M Toggles the currently selectedcollapsed region between thecollapsed and expanded state.
Edit.StopOutlining CTRL + M, P Removes all outlining informationfrom the whole document.
Edit.Comment-Selection
CTRL + K, C orCTRL + E, C
Inserts // at the beginning of thecurrent line or every line of thecurrent selection.
Edit.Uncomment-Selection
CTRL + K, U orCTRL + E, U
Removes the // at the beginning ofthe current line or every line of the
current selection.
Edit.Format-Document
CTRL + K, D orCTRL + E, D
Formats the current documentaccording to the indentation andcode formatting settings specifiedon the Formatting pane underTools | Options | Text Editor | C#.
Edit.Format-Selection
CTRL + K, F orCTRL + E, F
Formats the current selectionaccording to the indentation andcode formatting settings specifiedon the Formatting pane underTools | Options | Text Editor | C#.
Edit.InsertSnippet CTRL + K, X Displays the Code Snippet Picker.The selected code snippet will beinserted at the caret position.
Edit.SurroundWith CTRL + K, S Displays the Code Snippet Picker.The selected code snippet will be
wrapped around the selected text.
Edit.InvokeSnippet-FromShortcut
TAB Inserts the expanded code snippetfrom the shortcut name.
Edit.Cycle-ClipboardRing
CTRL + SHIFT + V Pastes text from the Clipboard ringto the caret location in the file.Subsequent use of the shortcut keyiterates through the items in theClipboard ring.
Edit.Replace CTRL + H Displays the replace options in theQuick Replace tab of the Find andReplace dialog box.
Edit.ReplaceInFiles CTRL + SHIFT + H Displays the replace options on theReplace in Files tab of the Findand Replace dialog box.
View.Show-
SmartTag
CTRL + PERIOD (.)
or SHIFT + ALT +F10
Displays the available options on
the Smart Tag menu.
Edit.Toggle-CompletionMode
CTRL + ALT +SPACEBAR
Toggles between suggestion mode(all commit characters except fortab leave entered text as-is, tabchooses a completion item in thelist) and completion mode.
Edit.
ExtendColumn
SHIFT + ALT +
Creates a box selection instead of a
stream selection.
File
File.NewProject CTRL + SHIFT + N Displays the New Project dialogbox.
File.OpenProject CTRL + SHIFT + O Displays the Open Project dialogbox, where existing projects can beadded to the solution.
Project.AddClass SHIFT + ALT + C Displays the Add New Item dialogbox and selects Class template asdefault.
Project.Add-ExistingItem
SHIFT + ALT + A Displays the Add Existing Itemdialog box, where existing files canbe added to the current project.
Project.Add-NewItem
CTRL + SHIFT + A Displays the Add New Item dialogbox, where a new file can be addedto the current project.
Window.ShowEz-MDIFileList
CTRL + ALT +DOWN ARROW
Displays a pop-up listing of all opendocuments.
IntelliSense
Edit.CompleteWord CTRL + SPACEBARor CTRL + K, W
Completes the current word in thecompletion list.
Edit.ListMembers CTRL + J orCTRL + K, L
Invokes the IntelliSensecompletion list.
Edit.QuickInfo CTRL + K, I Displays the complete declarationfor the specified identifier in yourcode in a Quick Info tooltip.
Edit.ParameterInfo CTRL + SHIFT +SPACEBAR orCTRL K, P
Displays the name, number, andtype of parameters required for thespecified method.
MakeCompletionListTransparent
CTRL Causes a visible completion list tobecome transparent.
Navigation
Edit.NavigateTo CTRL + COMMA (,) Displays the NavigateTo window,which allows quick navigation tofiles, types, and members. The wordat the caret seeds the search.
Edit.FindAll-References
SHIFT + F12 orCTRL + K, R
Displays a list of all references forthe symbol selected.
Edit.GoToBrace CTRL + ] Moves the caret location to the
matching brace in the source file.Edit.GoToDefinition F12 Navigates to the declaration for the
selected symbol in code.
Edit.GoToNext-Location
F8 Moves the caret to the next item,such as a task in the Task Listwindow or a search match in theFind Results window. Subsequentinvocations will move to the nextitem in the list.
Edit.Incremental-Search CTRL + I Activates incremental search. Ifincremental search is on, but noinput is passed, the previous searchquery is used. If search input hasbeen found, next invocationsearches for the next occurrence ofthe input text.
Edit.FindNext,Edit.FindPrevious
F3 and SHIFT + F3 Searches again for the last searchpattern in the direction specified.
Edit.FindNext-Selected,Edit.FindPrevious-Selected
CTRL + F3 andCTRL + SHIFT + F3
Sets the search pattern to theselected text, then search in thedirection specified.
View.Forward-BrowseContext
CTRL + SHIFT + 7 Moves to the next item called incode in the current file. Uses the GoTo Definition navigation stack.
View.PopBrowse-Context CTRL + SHIFT + 8 Moves to the previous item called incode in the current file. Uses the GoTo Definition navigation stack.
View.Navigate-Backward
CTRL + HYPHEN (-) Moves to the previously browsedline of code.
View.Navigate-Forward
CTRL + SHIFT +HYPHEN (-)
Moves to the next browsed line ofcode.
Edit.FindInFiles CTRL + SHIFT + F Displays the Find in Files tab of theFind and Replace dialog box.
Edit.FindSymbol ALT + F12 Displays the Find Symbol pane ofthe Find and Replace dialog box.
View.ViewCode F7 Displays the selected item in Codeview of the editor.
View.ViewDesigner,
View.ViewMarkup
SHIFT + F7 Switches between Design and
Source views for the currentdocument
Window.MoveTo-NavigationBar
CTRL + F2 Moves focus to the drop-down barlocated at the top of the editorwhen the editor is in Code view orServer Code view.
Edit.Find CTRL + F Displays the Find Quicktab of theFind and Replace dialog box.
Edit.GoTo CTRL + G Displays the Go to Line dialog box.
Edit.GoToFind-Combo
CTRL + / Moves focus to the Find/Commandbox on the Standard toolbar.
EditorContext-Menus.Code-Window.ViewCall-Hierarchy
CTRL + K, T Brings focus to the Call Hierarchywindow using the member at thecaret as a top-level node.
Edit.NextHighlight-edReference,Edit.PreviousHigh-lightedReference
CTRL + SHIFT +DOWN ARROWand CTRL + SHIFT+ UP ARROW
Moves the caret to the next orprevious highlighted identifiermatching the current one.
VS KB Brochure C#_Letter.indd 2 7/2/10 3:53 PM
8/2/2019 Vs KB Brochure CSharp Letter HiRez
2/2
2009MicrosoftCorporation.Allrightsreserved.Microsoft,IntelliSense,VisualC#,VisualStudio,andtheVisualStudiologosaretrademarksoftheMicrosoftgroupofcompanies.Allothertrademarksarethepropertyoftheirrespectiveowners.
RefactoringCodeRush Xpress is a free plug-in from Developer ExpressInc., in partnership with Microsoft. CodeRush Xpresssupports more than 50 refactoring features. See www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/for more information.
Refactor.-EncapsulateField
CTRL + R, E Displays the Encapsulate Fielddialog box, which allows creationof a property from an existing fieldand updates all references to usethe new property.
Refactor.Extract-Interface
CTRL + R, I Displays the Extract Interfacedialog box, which allows creationof a new interface with membersderived from an existing class,struct, or interface.
Refactor.Extract-Method
CTRL + R, M Displays the Extract Method dialogbox, which allows creation of a newmethod from the selected code.
Refactor.Remove-Parameters
CTRL + R, V Displays the Remove Parametersdialog box, which allows removal ofparameters from methods, indexers,or delegates by changing thedeclaration at any locations wherethe member is called.
Refactor.Rename CTRL + R, R or F2 Displays the Rename dialog
box, which allows renaming allreferences for an identifier.
Refactor.Reorder-Parameters
CTRL + R, O Displays the Reorder Parametersdialog box, which allows changesto the order of the parameters formethods, indexers, and delegates.
Refactor! CTRL +BACKQUOTE (`)
Invokes available Developer ExpressInc. refactorings when it is installed.
BuildBuild.BuildSolution F6 or
CTRL+SHIFT+BBuilds all the projects inthe solution.
Build.BuildSelection SHIFT+F6 Builds the selected projectand its dependencies.
Note: You can choose to use these key bindings from the VisualC# Development Settings. To change these settings, go to Tools| Import and Export Settings ... and select Reset All Settings.Then select Visual C# Development Settings. You could alsoimport only the key bindings by selecting Import SelectedEnvironment Settings instead ofReset All Settings. Tocustomize individual key bindings, go to Tools | Options |Environment | Keyboard.
Debugging
Debug.Autos CTRL+D, A Displays the Autos window, whichdisplays variables used in the current lineof code and the preceding line of code.
Debug.CallStack CTRL+D, C Displays the Call Stackwindow,which displays a list of all a ctivemethods or stack frames for thecurrent thread of execution.
Debug.Immediate CTRL+D, I Displays the Immediate window,where expressions can be evaluated.
Debug.Locals CTRL+D, L Displays the Locals window, whichdisplays the local variables and theirvalues for each method in thecurrent stack frame.
Debug.QuickWatch CTRL+D, Q Displays the QuickWatch dialogbox that has the current value ofthe selected expression.
Debug.Start F5 Launches the application under thedebugger based on the settings fromthe startup project. When in Breakmode, invoking this command will runthe application until the next breakpoint.
Debug.Start-WithoutDebugging
CTRL+F5 Launches the application withoutinvoking the debugger.
Debug.StepInto F11 Executes code one statement at atime, following execution intomethod calls.
Debug.Step-IntoSpecific
SHIFT+ALT+F11 Prompts to select which subexpression to step into, regardlessof the tools options setting forskipping properties and operators.
Debug.StepOut SHIFT+F11 Executes the remaining lines of amethod in which the currentexecution point is located.
Debug.StepOver F10 Executes the next line of code, butdoes not follow execution throughany method calls.
Debug.Stop-Debugging
SHIFT+F5 Stops running the currentapplication under the debugger.
Debug.Toggle-Breakpoint
F9 Sets or removes a breakpoint at thecurrent line.
Debug.Watch CTRL+D, W Displays the Watch window, whichdisplays the values of selectedvariables or watch expressions.
Debug.Enable-Breakpoint
CTRL+F9 Toggles the breakpoint betweendisabled and enabled.
MakeDatatipTransparent
[CTRL] Causes a visible datatip to becometransparent.
Test.RunTestsIn-CurrentContext
CTRL+R, T Runs the unit test containingthe caret.
Test.RunAllTests-InSolution
CTRL+R, A Runs all of the unit tests inthe solution.
WindowView.ClassView CTRL + W, C Displays the Class View window.
View.Code-Definiti onWindow
CTRL + W, D Displays the Code Definitionwindow.
View.ErrorList CTRL + W, E Displays the Error List window.
View.ObjectBrowser CTRL + W, J Displays the Object Browser.
View.Output CTRL + W, O Displays the Output window, wherestatus messages can be viewed atrun time.
View.Properties-Window
CTRL + W, P Displays the Properties window,which lists the design-timeproperties and events for thecurrently selected item.
View.Solution-Explorer
CTRL + W, S Displays Solution Explorer, whichlists the projects and files in thecurrent solution.
View.TaskList CTRL + W, T Displays the Task List window,which displays custom tasks,comments, shortcuts, warnings, anderror messages.
View.Toolbox CTRL + W, X Displays the Toolbox, whichcontains controls that can beincluded or used with your code.
View.ServerExplorer CTRL + W, L Displays Server Explorer, which letsyou view and manipulate databaseservers, event logs, message queues,Web services, and other operatingsystem services.
Window.CloseTool-Window
SHIFT + ESC Closes the current tool window.
Data.ShowData-Sources
SHIFT + ALT + D Displays the Data Sources window.
Window.Close-DocumentWindow
CTRL + F4 Closes the current tab.
Window.NextDocu-mentWindowNav
CTRL + TAB Displays the IDE Navigator, withthe first document window selected.
View.CallHierarchy CTRL + W, K Displays the Call Hierarchywindow, which lists callers andcallees for a given member.
View.ZoomIn,View.ZoomOut
CTRL + SHIFT +PERIOD (.) andCTRL + SHIFT +COMMA (,)
Increases (>) or decreases (