Share via


Visual Studio 中常用命令的預設鍵盤快速鍵

您可以選擇這些預設鍵盤快速鍵以存取 Visual Studio 中的常用命令。如需內含預設快速鍵命令的完整清單,請參閱預先定義的鍵盤快速鍵

注意事項注意事項

您可以開啟 [選項] 對話方塊,展開 [環境] 節點,然後選擇 [鍵盤],查閱命令的捷徑。

本主題內容

組建

Edit

專案

工具

視窗

偵錯

檔案

重構

檢視

組建

命令

鍵盤快速鍵 [內容]

Build.BuildSolution

Ctrl+Shift+B [全域]

Build.Cancel

Ctrl+Break [全域]

Build.Compile

Ctrl+F7 [全域]

Build.RunCodeAnalysisonSolution

Alt+F11 [全域]

偵錯

命令

鍵盤快速鍵 [內容]

Debug.BreakatFunction

Ctrl+B [全域]

Debug.BreakAll

Ctrl+Alt+Break [全域]

Debug.DeleteAllBreakpoints

Ctrl+Shift+F9 [全域]

Debug.Exceptions

Ctrl+Alt+E [全域]

Debug.QuickWatch

Ctrl+Alt+Q [全域]

或 Shift+F9 [全域]

Debug.Restart

Ctrl+Shift+F5 [全域]

Debug.RunToCursor

Ctrl+F10 [全域]

Debug.SetNextStatement

Ctrl+Shift+F10 [全域]

Debug.Start

F5 [全域]

Debug.StartWithoutDebugging

Ctrl+F5 [全域]

Debug.StepInto

F11 [全域]

Debug.StepOut

Shift+F11 [全域]

Debug.StepOver

F10 [全域]

Debug.StopDebugging

Shift+F5 [全域]

Debug.ToggleBreakpoint

F9 [全域]

Edit

命令

鍵盤快速鍵 [內容]

Edit.BreakLine

Enter [文字編輯器、報表設計工具、Windows Form 設計工具]

或 Shift+Enter [文字編輯器]

Edit.CollapsetoDefinitions

Ctrl+M、Ctrl+O [文字編輯器]

Edit.CommentSelection

Ctrl+K、Ctrl+C [文字編輯器]

Edit.CompleteWord

Alt+向右鍵 [文字編輯器、工作流程設計工具]

或 Ctrl+空格鍵 [文字編輯器、工作流程設計工具]

或 Ctrl+K、W [工作流程設計工具]

或 Ctrl+K、Ctrl+W [工作流程設計工具]

Edit.Copy

Ctrl+C [全域]

或 Ctrl+Insert [全域]

Edit.Cut

Ctrl+X [全域]

或 Shift+Delete [全域]

Edit.Delete

Delete [全域、Team Explorer]

或 Shift+Delete [循序圖、UML 活動圖、分層圖]

或 Ctrl+Delete [類別圖]

Edit.Find

Ctrl+F [全域]

Edit.FindAllReferences

Shift+F12 [全域]

Edit.FindinFiles

Ctrl+Shift+F [全域]

Edit.FindNext

F3 [全域]

Edit.FindNextSelected

Ctrl+F3 [全域]

Edit.FormatDocument

Ctrl+K、Ctrl+D [文字編輯器]

Edit.FormatSelection

Ctrl+K、Ctrl+F [文字編輯器]

Edit.GoTo

Ctrl+G [全域]

Edit.GoToDeclaration

Ctrl+F12 [全域]

Edit.GoToDefinition

F12

Edit.GoToFindCombo

Ctrl+D [全域]

Edit.GoToNextLocation

F8 [全域]

Edit.InsertSnippet

Ctrl+K、Ctrl+X [全域]

Edit.InsertTab

Tab [報表設計工具、Windows Form 設計工具、文字編輯器]

Edit.LineCut

Ctrl+L [文字編輯器]

Edit.LineDownExtendColumn

Shift+Alt+向下鍵 [文字編輯器]

Edit.LineOpenAbove

Ctrl+Enter [文字編輯器]

Edit.ListMembers

Ctrl+J [文字編輯器、工作流程設計工具]

或 Ctrl+K、Ctrl+L [工作流程設計工具]

或 Ctrl+K、L [工作流程設計工具]

Edit.NavigateTo

Ctrl+, [全域]

Edit.OpenFile

Ctrl+Shift+G [全域]

Edit.OvertypeMode

Insert [文字編輯器]

Edit.ParameterInfo

Ctrl+Shift+空格鍵 [文字編輯器、工作流程設計工具]

或 Ctrl+K、Ctrl+P [工作流程設計工具]

或 Ctrl+K、P [工作流程設計工具]

Edit.Paste

Ctrl+V [全域]

或 Shift+Insert [全域]

Edit.PeekDefinition

Alt+F12 [文字編輯器]

Edit.Redo

Ctrl+Y [全域]

或 Shift+Alt+退格鍵 [全域]

或 Ctrl+Shift+Z [全域]

Edit.Replace

Ctrl+H [全域]

Edit.SelectAll

Ctrl+A [全域]

Edit.SelectCurrentWord

Ctrl+W [文字編輯器]

Edit.SelectionCancel

Esc [文字編輯器、報表設計工具,設定設計工具、Windows Form 設計工具、Managed 資源編輯器]

Edit.SurroundWith

Ctrl+K、Ctrl+S [全域]

Edit.TabLeft

Shift+Tab [文字編輯器、報表設計工具、Windows Form 設計工具]

Edit.ToggleAllOutlining

Ctrl+M、Ctrl+L [文字編輯器]

Edit.ToggleBookmark

Ctrl+K、Ctrl+K [文字編輯器]

Edit.ToggleCompletionMode

Ctrl+Alt+空格鍵 [文字編輯器]

Edit.ToggleOutliningExpansion

Ctrl+M、Ctrl+M [文字編輯器]

Edit.UncommentSelection

Ctrl+K、Ctrl+U [文字編輯器]

Edit.Undo

Ctrl+Z [全域]

或 Alt+退格鍵 [全域]

Edit.WordDeleteToEnd

Ctrl+Delete [文字編輯器]

Edit.WordDeleteToStart

Ctrl+退格鍵 [文字編輯器]

檔案

命令

鍵盤快速鍵 [內容]

File.Exit

Alt+F4 [全域]

File.NewFile

Ctrl+N [全域]

File.NewProject

Ctrl+Shift+N [全域]

File.NewWebSite

Shift+Alt+N [全域]

File.OpenFile

Ctrl+O [全域]

File.OpenProject

Ctrl+Shift+O [全域]

File.OpenWebSite

Shift+Alt+O [全域]

File.Rename

F2 [Team Explorer]

File.SaveAll

Ctrl+Shift+S [全域]

File.SaveSelectedItems

Ctrl+S [全域]

File.ViewinBrowser

Ctrl+Shift+W [全域]

專案

命令

鍵盤快速鍵 [內容]

Project.AddExistingItem

Shift+Alt+A [全域]

Project.AddNewItem

Ctrl+Shift+A [全域]

重構

命令

鍵盤快速鍵 [內容]

Refactor.ExtractMethod

Ctrl+R、Ctrl+M [全域]

工具

命令

鍵盤快速鍵 [內容]

Tools.AttachtoProcess

Ctrl+Alt+P [全域]

檢視

命令

鍵盤快速鍵 [內容]

View.ClassView

Ctrl+Shift+C [全域]

View.EditLabel

F2 [全域]

View.ErrorList

Ctrl+\、Ctrl+E [全域]

或 Ctrl+\、E [全域]

View.NavigateBackward

Ctrl+- [全域]

View.NavigateForward

Ctrl+Shift+- [全域]

View.ObjectBrowser

Ctrl+Alt+J [全域]

View.Output

Ctrl+Alt+O [全域]

View.PropertiesWindow

F4

View.Refresh

F5 [Team Explorer、Team Foundation Build 詳細資料編輯器]

View.ServerExplorer

Ctrl+Alt+S [全域]

View.ShowSmartTag

Ctrl+.[Global]

或 Shift+Alt+F10 [全域、HTML 編輯器設計檢視]

View.SolutionExplorer

Ctrl+Alt+L [全域]

View.TfsTeamExplorer

Ctrl+\、Ctrl+M [全域]

View.Toolbox

Ctrl+Alt+X [全域]

View.ViewCode

Enter [類別圖]

或 F7 [設定設計工具]

View.ViewDesigner

Shift+F7 [HTML 編輯器原始碼檢視]

視窗

命令

鍵盤快速鍵 [內容]

Window.ActivateDocumentWindow

Esc [全域]

Window.CloseDocumentWindow

Ctrl+F4 [全域]

Window.NextDocumentWindow

Ctrl+F6 [全域]

Window.NextDocumentWindowNav

Ctrl+Tab [全域]

Window.NextSplitPane

F6 [全域]