欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

visual studio 快捷键 shortcuts 有大用 有大大用

visual studio shortcut 

移动到下一个错误 the next error    F8  ? (Ctrl+Shift+F12) ?

移动到上一个错误 the previous one   Shift + F8 




 选中当前单词

Ctrl+D

Above solved the purpose for me.



How to select current word in Visual Studio Code (VS Code)?

But ctrl+D is defined as "editor.action.addSelectionToNextFindMatch", so if you press it more than once, it will try to search and select same word in the file which then can be used to do "multi word editing".  相同,下一个  多单词



扩选  Shrink/Expand Selection.

Shortcut key for selecting a word and extending the selection in VS Code

The shrink/expand selection commands should be what you are looking for. The command names are editor.action.smartSelect.grow (default keybinding shift+alt+right) and editor.action.smartSelect.shrink (default keybinding shift+alt+left).

扩选

The default keybinding is ctrl+shift+right/ctrl+shift+left (not alt). 


{
  "key": "alt+s",
  "command": "editor.action.smartSelect.grow",
  "when": "editorTextFocus"
}


扩选 扩大 扩展

image.png

image.png

image.png


Visual Studio shortcut keys

A free shortcut key reference guide for Visual Studio.

Use it to make development easier and more productive.

The most important shortcuts are dark, like so:   Shortcut

Visual Studio shortcut keys



General Shortcuts

SHORTCUTDESCRIPTION
Ctrl-X or Shift-DeleteCuts the currently selected item to the clipboard. Without selection it cuts the entire line to the clipboard.
Ctrl-C or Ctrl-InsertCopies the currently selected item to the clipboard. Without selection it copies the entire line to the clipboard.
Ctrl-V or Shift-InsertPastes the item in the clipboard at the cursor (with selection in clipboard), or at the next line (with line in clipboard).
Ctrl-Z or Alt-BackspaceUndo previous editing action
Ctrl-Y or Ctrl-Shift-ZRedo the previous undo action
Ctrl-Shift-V or Ctrl-Shift-InsertPastes an item from the clipboard ring tab of the Toolbox at the cursor in the file and automatically selects the pasted item. Cycle through the items on the clipboard by pressing the shortcut keys repeatedly
Ctrl + . or Shift+Alt+F10Opens smart tag and resolves a wide array of suggested code refactorings
EscCloses a menu or dialog, cancels an operation in progress, or places focus in the current document window
Ctrl-SSaves the selected files in the current project (usually the file that is being edited)
Ctrl-Shift-SSaves all documents and projects
Ctrl-PDisplays the Print dialog
F7Switches from the design view to the code view in the editor
Shift-F7Switches from the code view to the design view in the editor
F8Moves the cursor to the next item, for example in the TaskList window or Find Results window
Shift-F8Moves the cursor to the previous item, for example in the TaskList window or Find Results window
Shift-F12Finds a reference to the selected item or the item under the cursor
Ctrl-Shift-GOpens the file whose name is under the cursor or is currently selected
Ctrl-/Switches focus to the Find/Command box on the Standard toolbar
Ctrl-Shift-F12Moves to the next task in the TaskList window
Ctrl-Shift-8Moves backward in the browse history. Available in the object browser or Class View window
Alt-Left ArrowGo back in the web browser history
Alt-Right ArrowGo forward in the web browser history



Text Navigation

SHORTCUTDESCRIPTION
Left ArrowMoves the cursor one character to the left
Right ArrowMoves the cursor one character to the right
Down ArrowMoves the cursor down one line
Up ArrowMoves the cursor up one line
Page DownScrolls down one screen in the editor window
Page UpScrolls up one screen in the editor window
EndMoves the cursor to the end of the current line
HomeMoves the cursor to the beginning of the line. If you press Home when the cursor is already at the start of the line, it will toggle the cursor between the first non-whitespace character and the real start of the line
Ctrl-EndMoves the cursor to the end of the document
Ctrl-HomeMoves the cursor to the start of the document
Ctrl-GDisplays the Go to Line dialog. If the debugger is running, the dialog also lets you specify addresses or function names to go to
Ctrl-]Moves the cursor to the matching brace in the document. If the cursor is on an opening brace, this will move to the corresponding closing brace and vice versa
Ctrl-K, Ctrl-NMoves to the next bookmark in the document
Ctrl-K, Ctrl-PMoves to the previous bookmark
Ctrl-K, Ctrl-IDisplays Quick Info, based on the current language
Ctrl-Down ArrowScrolls text down one line but does not move the cursor. This is useful for scrolling more text into view without losing your place. Available only in text editors
Ctrl-Up ArrowScrolls text up one line but does not move the cursor. Available only in text editors
Ctrl-Right ArrowMoves the cursor one word to the right
Ctrl-Left ArrowMoves the cursor one word to the left
Ctrl-Shift-1Navigates to the next definition, declaration, or reference of an item. Available in the object browser and Class View window. Also available in source editing windows if you have already used the Edit.GoToReference (Shift-F12) shortcut
Ctrl-Shift-2Navigates to the previous definition, declaration, or reference of an item



Text Manipulation

SHORTCUTDESCRIPTION
EnterInserts a new line
DeleteDeletes one character to the right of the cursor
InsertToggles between insert and overtype insertion modes
TabIndents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop
Shift-TabMoves current line or selected lines one tab stop to the left
Backspace or Shift-BackspaceDeletes one character to the left of the cursor
Ctrl-K, Ctrl-CMarks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language
Ctrl-K, Ctrl-URemoves the comment syntax from the current line or currently selected lines of code
Ctrl-T or Shift-EnterSwaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors
Ctrl-K, Ctrl-LRemoves all unnamed bookmarks in the current document
Ctrl-M, Ctrl-OAutomatically determines logical boundaries for creating regions in code, such as procedures, and then hides them. This collapses all such regions in the current document
Alt-Right Arrow or Ctrl-SpacebarDisplays statement completion based on the current language or autocompletes word if existing text unambiguously identifies a single symbol
Ctrl-K, Ctrl-\Removes horizontal whitespace in the selection or deletes whitespace adjacent to the cursor if there is no selection
Ctrl-K, Ctrl-FApplies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog to the selected text.
Ctrl-LCuts all selected lines or the current line if nothing has been selected to the clipboard
Ctrl-Shift-LDeletes all selected lines or the current line if no selection has been made
Ctrl-EnterInserts a blank line above the cursor
Ctrl-Shift-EnterInserts a blank line below the cursor
Shift-Alt-TMoves the line containing the cursor below the next line
Ctrl-JLists members for statement completion when editing code
Ctrl-UChanges the selected text to lowercase characters
Ctrl-Shift-UChanges the selected text to uppercase characters
Ctrl-Shift-SpacebarDisplays a tooltip that contains information for the current parameter, based on the current language
Ctrl-M, Ctrl-URemoves the outlining information for the currently selected region
Ctrl-M, Ctrl-PRemoves all outlining information from the entire document
Ctrl-R, Ctrl-PSwaps the anchor and endpoint of the current selection
Ctrl-M, Ctrl-LToggles all previously marked hidden text sections between hidden and display states
Ctrl-K, Ctrl-KSets or removes a bookmark at the current line
Ctrl-M, Ctrl-MToggles the currently selected hidden text section or the section containing the cursor if there is no selection between the hidden and display states
Ctrl-K, Ctrl-HSets or removes a shortcut in the tasklist to the current line
Ctrl-R, Ctrl-REnables or disables word wrap in an editor
Ctrl-R, Ctrl-WShows or hides spaces and tab marks
Ctrl-DeleteDeletes the word to the right of the cursor
Ctrl-BackspaceDeletes the word to the left of the cursor
Ctrl-Shift-TTransposes the two words that follow the cursor. (For example, |End Sub would be changed to read Sub End|.)
Ctrl-.[dot]Display options on smarttag menu.Very useful for showing using/Imports options.



Text Selection

SHORTCUTDESCRIPTION
Shift-Left ArrowMoves the cursor to the left one character, extending the selection
Shift-Alt-Left ArrowMoves the cursor to the left one character, extending the column selection
Shift-Right ArrowMoves the cursor to the right one character, extending the selection
Shift-Alt-Right ArrowMoves the cursor to the right one character, extending the column selection
Ctrl-Shift-EndMoves the cursor to the end of the document, extending the selection
Ctrl-Shift-HomeMoves the cursor to the start of the document, extending the selection
Ctrl-Shift-]Moves the cursor to the next brace, extending the selection
Shift-Down ArrowMoves the cursor down one line, extending the selection
Shift-Alt-Down ArrowMoves the cursor down one line, extending the column selection
Shift-EndMoves the cursor to the end of the current line, extending the selection
Shift-Alt-EndMoves the cursor to the end of the line, extending the column selection
Shift-HomeMoves the cursor to the start of the line, extending the selection
Shift-Alt-HomeMoves the cursor to the start of the line, extending the column selection
Shift-Up ArrowMoves the cursor up one line, extending the selection
Shift-Alt-Up ArrowMoves the cursor up one line, extending the column selection
Shift-Page DownExtends selection down one page
Shift-Page UpExtends selection up one page
Ctrl-ASelects everything in the current document
Ctrl-WSelects the word containing the cursor or the word to the right of the cursor
Ctrl-=Selects from the current location in the editor back to the previous location in the navigation history
Ctrl-Shift-Page DownMoves the cursor to the last line in view, extending the selection
Ctrl-Shift-Page UpMoves the cursor to the top of the current window, extending the selection
Ctrl-Shift-Alt-Right ArrowMoves the cursor to the right one word, extending the column selection
Ctrl-Shift-Left ArrowMoves the cursor one word to the left, extending the selection
Ctrl-Shift-Alt-Left ArrowMoves the cursor to the left one word, extending the column selection



Project Related

SHORTCUTDESCRIPTION
Ctrl-Shift-BBuilds the solution
Ctrl-NDisplays the New File dialog. Note: files created this way are not associated with a project. Use Ctrl-Shift-A to add a new file in a project
Ctrl-Shift-NDisplays the New Project dialog
Ctrl-ODisplays the Open File dialog
Ctrl-Shift-ODisplays the Open Project dialog
Shift-Alt-ADisplays the Add Existing Item dialog
Ctrl-Shift-ADisplays the Add New Item dialog
Ctrl-Alt-InsertAllows you to override base class methods in a derived class when an overridable method is highlighted in the Class View pane



Window Manipulation

SHORTCUTDESCRIPTION
Shift-Alt-EnterToggles full screen mode
Ctrl-+Goes back to the previous location in the navigation history. (For example, if you press Ctrl-Home to go to the start of a document, this shortcut will take the cursor back to wherever it was before you pressed Ctrl-Home.)
Ctrl-Shift-+Moves forward in the navigation history. This is effectively an undo for the View.NavigateBackward operation
Ctrl-F4Closes the current MDI child window
Shift-EscCloses the current tool window
Ctrl-F2Moves the cursor to the navigation bar at the top of a code view
Ctrl-TabCycles through the MDI child windows one window at a time
Ctrl-F6,Ctrl-Shift-TabMoves to the previous MDI child window
Alt-F6,Ctrl-Shift-F6Moves to the next tool window
Shift-Alt-F6Moves to the previously selected window
F6Moves to the next pane of a split pane view of a single document
Shift-F6Moves to the previous pane of a document in split pane view
Ctrl-PagedownMoves to the next tab in the document or window (e.g., you can use this to switch the HTML editor from its design view to its HTML view
Ctrl-PageUpMoves to the previous tab in the document or window



Control Editor (designer)

SHORTCUTDESCRIPTION
Ctrl-Down ArrowMoves the selected control down in increments of one on the design surface
Down ArrowMoves the selected control down to the next grid position on the design surface
Ctrl-Left ArrowMoves the control to the left in increments of one on the design surface
Left ArrowMoves the control to the left to the next grid position on the design surface
Ctrl-Right ArrowMoves the control to the right in increments of one on the design surface
Right ArrowMoves the control to the right into the next grid position on the design surface
Ctrl-Up ArrowMoves the control up in increments of one on the design surface
Up ArrowMoves the control up into the next grid position on the design surface
TabMoves to the next control in the tab order
Shift-TabMoves to the previous control in the tab order
Ctrl-Shift-Down ArrowIncreases the height of the control in increments of one on the design surface
Shift-Down ArrowIncreases the height of the control to the next grid position on the design surface
Ctrl-Shift-Left ArrowReduces the width of the control in increments of one on the design surface
Shift-Left ArrowReduces the width of the control to the next grid position on the design surface
Ctrl-Shift-Right ArrowIncreases the width of the control in increments of one on the design surface
Shift-Left ArrowIncreases the width of the control to the next grid position on the design surface
Ctrl-Shift-Up ArrowDecreases the height of the control in increments of one on the design surface
Shift-Up ArrowDecreases the height of the control to the next grid position on the design surface



Search and Replace

SHORTCUTDESCRIPTION
Ctrl-FDisplays the Find dialog
Ctrl-Shift-FDisplays the Find in Files dialog
F3Finds the next occurrence of the previous search text
Ctrl-F3Finds the next occurrence of the currently selected text or the word under the cursor if there is no selection
Shift-F3Finds the previous occurrence of the search text
Ctrl-Shift-F3Finds the previous occurrence of the currently selected text or the word under the cursor
Ctrl-DPlaces the cursor in the Find/Command line on the Standard toolbar
Alt-F3, HSelects or clears the Search Hidden Text option for the Find dialog
Ctrl-IStarts an incremental search—after pressing Ctrl-I, you can type in text, and for each letter you type, VS.NET will find the first occurrence of the sequence of letters you have typed so far. This is a very convenient facility, as it lets you find text by typing in exactly as many characters as are required to locate the text and no more. If you press Ctrl-I a second time without typing any characters, it recalls the previous pattern. If you press it a third time or you press it when an incremental search has already found a match, VS.NET searches for the next occurrence.
Alt-F3, CSelects or clears the Match Case option for Find and Replace operations
Alt-F3, RSelects or clears the Regular Expression option so that special characters can be used in Find and Replace operations
Ctrl-HDisplays the Replace dialog
Ctrl-Shift-HDisplays the Replace in Files dialog
Ctrl-Shift-IPerforms an incremental search in reverse direction
Alt-F3, SHalts the current Find in Files operation
Alt-F3, BSelects or clears the Search Up option for Find and Replace operations
Alt-F3, WSelects or clears the Match Whole Word option for Find and Replace operations
Alt-F3, PSelects or clears the Wildcard option for Find and Replace operations



Help

SHORTCUTDESCRIPTION
Ctrl-Alt-F1Displays the Contents window for the documentation
Ctrl-F1Displays the Dynamic Help window, which displays different topics depending on what items currently have focus. If the focus is in a source window, the Dynamic Help window will display help topics that are relevant to the text under the cursor
F1Displays a topic from Help that corresponds to the part of the user interface that currently has the focus. If the focus is in a source window, Help will try to display a topic relevant to the text under the cursor
Ctrl-Alt-F2Displays the Help Index window
Shift-Alt-F2Displays the Index Results window, which lists the topics that contain the keyword selected in the Index window
Alt-Down ArrowDisplays the next topic in the table of contents. Available only in the Help browser window
Alt-Up ArrowDisplays the previous topic in the table of contents. Available only in the Help browser window
Ctrl-Alt-F3Displays the Search window, which allows you to search for words or phrases in the documentation
Shift-Alt-F3Displays the Search Results window, which displays a list of topics that contain the string searched for from the Search window.
Shift-F1Displays a topic from Help that corresponds to the user interface item that has the focus



Debugging

SHORTCUTDESCRIPTION
Ctrl-Alt-V, ADisplays the Auto window to view the values of variables currently in the scope of the current line of execution within the current procedure
Ctrl-Alt-BreakTemporarily stops execution of all processes in a debugging session. Available only in run mode
Ctrl-Alt-BDisplays the Breakpoints dialog, where you can add and modify breakpoints
Ctrl-Alt-CDisplays the Call Stack window to display a list of all active procedures or stack frames for the current thread of execution. Available only in break mode
Ctrl-Shift-F9Clears all of the breakpoints in the project
Ctrl-Alt-DDisplays the Disassembly window
Ctrl-F9Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to work
Ctrl-Alt-EDisplays the Exceptions dialog
Ctrl-Alt-IDisplays the Immediate window, where you can evaluate expressions and execute individual commands
Ctrl-Alt-V, LDisplays the Locals window to view the variables and their values for the currently selected procedure in the stack frame
Ctrl-Alt-M, 1Displays the Memory 1 window to view memory in the process being debugged. This is particularly useful when you do not have debugging symbols available for the code you are looking at. It is also helpful for looking at large buffers, strings, and other data that does not display clearly in the Watch or Variables window
Ctrl-Alt-M, 2Displays the Memory 2 window
Ctrl-Alt-M, 3Displays the Memory 3 window
Ctrl-Alt-M, 4Displays the Memory 4 window
Ctrl-Alt-UDisplays the Modules window, which allows you to view the .dll or .exe files loaded by the program. In multiprocess debugging, you can right-click and select Show Modules for all programs
Ctrl-BOpens the New Breakpoint dialog
Ctrl-Alt-QDisplays the Quick Watch dialog with the current value of the selected expression. Available only in break mode. Use this command to check the current value of a variable, property, or other expression for which you have not defined a watch expression
Ctrl-Alt-GDisplays the Registers window, which displays CPU register contents
Ctrl-Shift-F5Terminates the current debugging session, rebuilds if necessary, and then starts a new debugging session. Available in break and run modes
Ctrl-Alt-NDisplays the Running Documents window that displays the set of HTML documents that you are in the process of debugging. Available in break and run modes
Ctrl-F10Starts or resumes execution of your code and then halts execution when it reaches the selected statement. This starts the debugger if it is not already running
Ctrl-Shift-F10Sets the execution point to the line of code you choose
Alt-NUM *Highlights the next statement to be executed
F5If not currently debugging, this runs the startup project or projects and attaches the debugger. If in break mode, this allows execution to continue (i.e., it returns to run mode).
Ctrl-F5Runs the code without invoking the debugger. For console applications, this also arranges for the console window to stay open with a "Press any key to continue" prompt when the program finishes
F11Executes code one statement at a time, tracing execution into function calls
Shift-F11Executes the remaining lines of a function in which the current execution point lies
F10Executes the next line of code but does not step into any function calls
Shift-F5Available in break and run modes, this terminates the debugging session
Ctrl-Alt-V, TDisplays the This window, which allows you to view the data members of the object associated with the current method
Ctrl-Alt-HDisplays the Threads window to view all of the threads for the current process
F9Sets or removes a breakpoint at the current line
Ctrl-F11Displays the disassembly information for the current source file. Available only in break mode
Ctrl-Alt-W, 1Displays the Watch 1 window to view the values of variables or watch expressions
Ctrl-Alt-W, 2Displays the Watch 2 window
Ctrl-Alt-W, 3Displays the Watch 3 window
Ctrl-Alt-W, 4Displays the Watch 4 window
Ctrl-Alt-PDisplays the Processes dialog, which allows you to attach or detach the debugger to one or more running processes



Object Browser

SHORTCUTDESCRIPTION
Alt-F12Displays the Find Symbol dialog
Ctrl-F12Displays the declaration of the selected symbol in the code
F12Displays the definition for the selected symbol in code
Ctrl-Alt-F12Displays the Find Symbol Results window
Ctrl-Alt-JDisplays the Object Browser to view the classes, properties, methods, events, and constants defined either in your project or by components and type libraries referenced by your project
Alt-+Moves back to the previously selected object in the selection history of the object browser
Shift-Alt-+Moves forward to the next object in the selection history of the object browser



Tool Window

SHORTCUTDESCRIPTION
Ctrl-Shift-MToggles the Command window into or out of a mode allowing text within the window to be selected
Ctrl-Shift-CDisplays the Class View window
Ctrl-Alt-ADisplays the Command window, which allows you to type commands that manipulate the IDE
Ctrl-Alt-TDisplays the Document Outline window to view the flat or hierarchical outline of the current document
Ctrl-Alt-FDisplays the Favorites window, which lists shortcuts to web pages
Ctrl-Alt-ODisplays the Output window to view status messages at runtime
F4Displays the Properties window, which lists the design-time properties and events for the currently selected item
Shift-F4Displays the property pages for the item currently selected. (For example, use this to show a project's settings.)
Ctrl-Shift-EDisplays the Resource View window
Ctrl-Alt-SDisplays the Server Explorer window, which allows you to view and manipulate database servers, event logs, message queues, web services, and many other operating system services
Ctrl-Alt-RDisplays the web browser window, which allows you to view pages on the Internet
Ctrl-Alt-LDisplays the Solution Explorer, which lists the projects and files in the current solution
Ctrl-Alt-KDisplays the TaskList window, which displays tasks, comments, shortcuts, warnings, and error messages
Ctrl-Alt-XDisplays the Toolbox, which contains controls and other items that can be dragged into editor and designer windows



Html Editor (Design View)

SHORTCUTDESCRIPTION
Ctrl-BToggles the selected text between bold and normal
Ctrl-Shift-TDecreases the selected paragraph by one indent unit
Ctrl-TIndents the selected paragraph by one indent unit
Ctrl-IToggles the selected text between italic and normal
Ctrl-Shift-KPrevents an absolutely positioned element from being inadvertently moved. If the element is already locked, this unlocks it
Ctrl-GToggles the grid
Ctrl-Shift-GSpecifies that elements be aligned using an invisible grid. You can set grid spacing on the Design pane of HTML designer options in the Options dialog, and the grid will be changed the next time you open a document
Ctrl-UToggles the selected text between underlined and normal
Ctrl-Shift-LDisplays the Bookmark dialog
Ctrl-JInserts <div></div> in the current HTML document
Ctrl-LWhen text is selected, displays the Hyperlink dialog
Ctrl-Shift-WDisplays the Insert Image dialog
Ctrl-Alt-Up ArrowAdds one row above the current row in the table
Ctrl-Alt-Down ArrowAdds one row below the current row in the table
Ctrl-Alt-Left ArrowAdds one column to the left of the current column in the table
Ctrl-Alt-Right ArrowAdds one column to the right of the current column in the table
Ctrl-Shift-QToggles display of marker icons for HTML elements that do not have a visual representation, such as comments, scripts, and anchors for absolutely positioned elements
Ctrl-Page DownSwitches from design view to HTML view and vice versa
Ctrl-QDisplays a 1-pixel border around HTML elements that support a BORDER attribute and have it set to zero, such as tables, table cells, and divisions



Macros

SHORTCUTDESCRIPTION
Alt-F8Displays the Macro Explorer window, which lists all available macros
Alt-F11Launches the macros IDE
Ctrl-Shift-RPlaces the environment in macro record mode or completes recording if already in record mode
Ctrl-Shift-PPlays back a recorded macro




Visual Studio 快捷键

Visual Studio 的免费快捷键参考指南。

使用它可以使开发更轻松、更高效。

最重要的快捷键是深色的,如下所示:   捷径

Visual Studio 快捷键



通用快捷方式

捷径描述
Ctrl-X 或者 Shift-删除将当前选定的项目剪切到剪贴板。如果没有选择,它会将整行剪切到剪贴板。
Ctrl-C 或者 Ctrl-插入将当前选定的项目复制到剪贴板。如果没有选择,它将整行复制到剪贴板。
Ctrl-V 或者 移位插入将剪贴板中的项目粘贴到光标处(在剪贴板中选择)或下一行(在剪贴板中使用行)。
Ctrl-Z 或者 Alt-退格键撤消先前的编辑操作
Ctrl-Y 或者 Ctrl-Shift-Z重做上一个撤消操作
Ctrl-Shift-V 或者 Ctrl-Shift-插入将工具箱的剪贴板环形选项卡中的项目粘贴到文件中的光标处,并自动选择粘贴的项目。通过反复按快捷键循环浏览剪贴板上的项目
Ctrl + 。 或者 Shift+Alt+F10打开智能标签并解决大量建议的代码重构
退出关闭菜单或对话框,取消正在进行的操作,或将焦点放在当前文档窗口中
Ctrl-S将选定的文件保存在当前项目中(通常是正在编辑的文件)
Ctrl-Shift-S保存所有文档和项目
Ctrl-P显示打印对话框
F7在编辑器中从设计视图切换到代码视图
Shift-F7在编辑器中从代码视图切换到设计视图
F8将光标移动到下一项,例如在 TaskList 窗口或 Find Results 窗口中
Shift-F8将光标移动到上一项,例如在 TaskList 窗口或 Find Results 窗口中
Shift-F12查找对选定项目或光标下项目的引用
Ctrl-Shift-G打开名称在光标下或当前被选中的文件
Ctrl-/将焦点切换到标准工具栏上的查找/命令框
Ctrl-Shift-F12移至 TaskList 窗口中的下一个任务
Ctrl-Shift-8在浏览历史记录中向后移动。在对象浏览器或类视图窗口中可用
Alt-左箭头返回网络浏览器历史记录
Alt-右箭头在网络浏览器历史中前进



文本导航

捷径描述
左箭头将光标向左移动一个字符
右箭头将光标向右移动一个字符
向下箭头将光标下移一行
向上箭头将光标向上移动一行
向下翻页在编辑器窗口中向下滚动一屏
向上翻页在编辑器窗口中向上滚动一屏
结尾将光标移动到当前行的末尾
将光标移动到行首。如果在光标已经位于行首时按 Home,它将在第一个非空白字符和行的实际开头之间切换光标
Ctrl-结束将光标移动到文档末尾
Ctrl-主页将光标移动到文档的开头
Ctrl-G显示转到行对话框。如果调试器正在运行,该对话框还允许您指定要访问的地址或函数名称
Ctrl-]将光标移动到文档中匹配的大括号。如果光标在左大括号上,这将移动到相应的右大括号,反之亦然
Ctrl-K,Ctrl-N移动到文档中的下一个书签
Ctrl-K,Ctrl-P移动到上一个书签
Ctrl-K,Ctrl-I根据当前语言显示快速信息
Ctrl-向下箭头将文本向下滚动一行,但不移动光标。这对于在不丢失位置的情况下将更多文本滚动到视图中很有用。仅在文本编辑器中可用
Ctrl-向上箭头将文本向上滚动一行,但不移动光标。仅在文本编辑器中可用
Ctrl-右箭头将光标向右移动一个单词
Ctrl-左箭头将光标向左移动一个单词
Ctrl-Shift-1导航到项目的下一个定义、声明或引用。在对象浏览器和类视图窗口中可用。如果您已经使用了 Edit.GoToReference (Shift-F12) 快捷方式,也可以在源代码编辑窗口中使用
Ctrl-Shift-2导航到项目的先前定义、声明或引用



文本操作

捷径描述
进入插入新行
删除删除光标右侧的一个字符
插入在插入和改写插入模式之间切换
标签将当前选定的一行或多行缩进一个制表位。如果没有选择,这将插入一个制表位
Shift-Tab将当前行或选定行向左移动一个制表位
退格 或者 Shift-Backspace删除光标左侧的一个字符
Ctrl-K,Ctrl-C使用编程语言的正确注释语法将当前行或选定的代码行标记为注释
Ctrl-K,Ctrl-U从当前行或当前选定的代码行中删除注释语法
Ctrl-T 或者 Shift-Enter交换光标两侧的字符。(例如,AC|BD 变为 AB|CD。)仅在文本编辑器中可用
Ctrl-K,Ctrl-L删除当前文档中所有未命名的书签
Ctrl-M,Ctrl-O自动确定在代码中创建区域(例如过程)的逻辑边界,然后隐藏它们。这会折叠当前文档中的所有此类区域
Alt-右箭头 或者 Ctrl-空格键如果现有文本明确标识单个符号,则根据当前语言显示语句完成或自动完成单词
Ctrl-K, Ctrl-\如果没有选择,则删除选择中的水平空白或删除与光标相邻的空白
Ctrl-K、Ctrl-F将“选项”对话框的“文本编辑器”部分中语言的“格式”窗格中指定的语言的缩进和空格格式应用于选定的文本。
Ctrl-L如果没有选择剪贴板,则剪切所有选定的行或当前行
Ctrl-Shift-L如果没有选择,则删除所有选定的行或当前行
Ctrl-Enter在光标上方插入一个空行
Ctrl-Shift-Enter在光标下方插入一个空行
Shift-Alt-T将包含光标的行移到下一行下方
Ctrl-J编辑代码时列出语句完成的成员
Ctrl-U将选定文本更改为小写字符
Ctrl-Shift-U将选定文本更改为大写字符
Ctrl-Shift-空格键根据当前语言显示包含当前参数信息的工具提示
Ctrl-M,Ctrl-U删除当前选定区域的大纲信息
Ctrl-M,Ctrl-P从整个文档中删除所有大纲信息
Ctrl-R,Ctrl-P交换当前选择的锚点和端点
Ctrl-M, Ctrl-L在隐藏和显示状态之间切换所有先前标记的隐藏文本部分
Ctrl-K,Ctrl-K在当前行设置或删除书签
Ctrl-M,Ctrl-M如果在隐藏和显示状态之间没有选择,则切换当前选定的隐藏文本部分或包含光标的部分
Ctrl-K,Ctrl-H将任务列表中的快捷方式设置或删除到当前行
Ctrl-R,Ctrl-R在编辑器中启用或禁用自动换行
Ctrl-R,Ctrl-W显示或隐藏空格和制表符
Ctrl-删除删除光标右侧的单词
Ctrl-退格键删除光标左侧的单词
Ctrl-Shift-T转置光标后面的两个单词。(例如,|End Sub 将被更改为 Sub End|。)
Ctrl-.[点]在智能标签菜单上显示选项。对于显示使用/导入选项非常有用。



文本选择

捷径描述
Shift-左箭头将光标向左移动一个字符,扩大选择范围
Shift-Alt-左箭头将光标向左移动一个字符,扩展列选择
Shift-右箭头将光标向右移动一个字符,扩大选择范围
Shift-Alt-右箭头将光标向右移动一个字符,扩展列选择
Ctrl-Shift-结束将光标移动到文档末尾,扩大选择范围
Ctrl-Shift-Home将光标移动到文档的开头,扩展选择
Ctrl-Shift-]将光标移动到下一个大括号,扩展选择
Shift-下箭头将光标下移一行,扩大选择范围
Shift-Alt-下箭头将光标下移一行,扩展列选择
移位结束将光标移动到当前行的末尾,扩展选择
Shift-Alt-End将光标移动到行尾,扩展列选择
班次回家将光标移动到行首,扩展选择
Shift-Alt-Home将光标移动到行首,扩展列选择
Shift-上箭头将光标向上移动一行,扩大选择范围
Shift-Alt-上箭头将光标上移一行,扩展列选择
Shift-Page Down将选择向下扩展一页
Shift-Page Up将选择扩展一页
Ctrl-A选择当前文档中的所有内容
Ctrl-W选择包含光标的单词或光标右侧的单词
Ctrl-=从编辑器中的当前位置选择回到导航历史记录中的上一个位置
Ctrl-Shift-Page Down将光标移动到视图中的最后一行,扩展选择
Ctrl-Shift-Page Up将光标移动到当前窗口的顶部,扩大选择范围
Ctrl-Shift-Alt-右箭头将光标向右移动一个单词,扩展列选择
Ctrl-Shift-左箭头将光标向左移动一个单词,扩大选择范围
Ctrl-Shift-Alt-左箭头将光标向左移动一个单词,扩展列选择



项目相关

捷径描述
Ctrl-Shift-B构建解决方案
Ctrl-N显示“新建文件”对话框。注意:以这种方式创建的文件与项目无关。使用 Ctrl-Shift-A 在项目中添加新文件
Ctrl-Shift-N显示“新建项目”对话框
Ctrl-O显示“打开文件”对话框
Ctrl-Shift-O显示“打开项目”对话框
Shift-Alt-A显示“添加现有项目”对话框
Ctrl-Shift-A显示“添加新项目”对话框
Ctrl-Alt-插入允许您在“类视图”窗格中突出显示可覆盖方法时覆盖派生类中的基类方法



窗口操作

捷径描述
Shift-Alt-Enter切换全屏模式
Ctrl-+返回到导航历史记录中的上一个位置。(例如,如果您按 Ctrl-Home 转到文档的开头,此快捷方式会将光标返回到您按 Ctrl-Home 之前的位置。)
Ctrl-Shift-+在导航历史记录中向前移动。这实际上是对 View.NavigateBackward 操作的撤消
Ctrl-F4关闭当前 MDI 子窗口
Shift-Esc关闭当前工具窗口
Ctrl-F2将光标移动到代码视图顶部的导航栏
Ctrl-Tab一次一个窗口在 MDI 子窗口中循环
Ctrl-F6、Ctrl-Shift-Tab移动到上一个 MDI 子窗口
Alt-F6、Ctrl-Shift-F6移动到下一个工具窗口
Shift-Alt-F6移动到先前选择的窗口
F6移动到单个文档的拆分窗格视图的下一个窗格
Shift-F6在拆分窗格视图中移动到文档的上一个窗格
Ctrl-Pagedown移动到文档或窗口中的下一个选项卡(例如,您可以使用它来将 HTML 编辑器从其设计视图切换到其 HTML 视图
Ctrl-PageUp移至文档或窗口中的上一个选项卡



控制编辑器(设计师)

捷径描述
Ctrl-向下箭头在设计图面上以 1 为增量向下移动选定控件
向下箭头将选定控件向下移动到设计图面上的下一个网格位置
Ctrl-左箭头在设计图面上以 1 为增量将控件向左移动
左箭头将控件向左移动到设计图面上的下一个网格位置
Ctrl-右箭头在设计图面上以 1 为增量向右移动控件
右箭头将控件向右移动到设计图面上的下一个网格位置
Ctrl-向上箭头在设计图面上以 1 为增量向上移动控件
向上箭头将控件向上移动到设计图面上的下一个网格位置
标签按 Tab 键顺序移动到下一个控件
Shift-Tab按 Tab 键顺序移动到上一个控件
Ctrl-Shift-下箭头在设计图面上以 1 为增量增加控件的高度
Shift-下箭头将控件的高度增加到设计图面上的下一个网格位置
Ctrl-Shift-左箭头在设计图面上以 1 为增量减小控件的宽度
Shift-左箭头将控件的宽度减小到设计图面上的下一个网格位置
Ctrl-Shift-右箭头在设计图面上以 1 为增量增加控件的宽度
Shift-左箭头将控件的宽度增加到设计图面上的下一个网格位置
Ctrl-Shift-向上箭头在设计图面上以 1 为增量减小控件的高度
Shift-上箭头将控件的高度降低到设计图面上的下一个网格位置



搜索和替换

捷径描述
Ctrl-F显示查找对话框
Ctrl-Shift-F显示“在文件中查找”对话框
F3查找上一个搜索文本的下一个匹配项
Ctrl-F3如果没有选择,则查找当前选定文本或光标下单词的下一个出现
Shift-F3查找上一次出现的搜索文本
Ctrl-Shift-F3查找上一次出现的当前选定文本或光标下的单词
Ctrl-D将光标放在标准工具栏上的查找/命令行中
Alt-F3, H选择或清除“查找”对话框的“搜索隐藏文本”选项
Ctrl-I开始增量搜索——按下 Ctrl-I 后,您可以输入文本,并且对于您输入的每个字母,VS.NET 将找到您迄今为止输入的字母序列的第一个匹配项。这是一个非常方便的工具,因为它使您可以通过键入与查找文本所需的字符数完全相同的字符来查找文本。如果您第二次按 Ctrl-I 而不键入任何字符,它会调用以前的模式。如果您第三次按下它,或者在增量搜索已经找到匹配项时按下它,VS.NET 将搜索下一个匹配项。
Alt-F3, C选择或清除查找和替换操作的匹配大小写选项
Alt-F3, R选择或清除正则表达式选项,以便可以在查找和替换操作中使用特殊字符
Ctrl-H显示替换对话框
Ctrl-Shift-H显示“在文件中替换”对话框
Ctrl-Shift-I反向执行增量搜索
Alt-F3, S停止当前在文件中查找操作
Alt-F3, B选择或清除查找和替换操作的向上搜索选项
Alt-F3, W选择或清除查找和替换操作的匹配整个字选项
Alt-F3, P选择或清除查找和替换操作的通配符选项



帮助

捷径描述
Ctrl-Alt-F1显示文档的目录窗口
Ctrl-F1显示动态帮助窗口,该窗口根据当前具有焦点的项目显示不同的主题。如果焦点在源窗口中,动态帮助窗口将显示与光标下的文本相关的帮助主题
F1显示帮助中与当前具有焦点的用户界面部分相对应的主题。如果焦点在源窗口中,帮助将尝试显示与光标下的文本相关的主题
Ctrl-Alt-F2显示帮助索引窗口
Shift-Alt-F2显示“索引结果”窗口,其中列出了包含在“索引”窗口中选择的关键字的主题
Alt-下箭头显示目录中的下一个主题。仅在帮助浏览器窗口中可用
Alt-向上箭头显示目录中的上一个主题。仅在帮助浏览器窗口中可用
Ctrl-Alt-F3显示搜索窗口,允许您在文档中搜索单词或短语
Shift-Alt-F3显示“搜索结果”窗口,其中显示包含从“搜索”窗口搜索的字符串的主题列表。
Shift-F1显示帮助中与具有焦点的用户界面项相对应的主题



调试

捷径描述
Ctrl-Alt-V, A显示自动窗口以查看当前过程中当前执行行范围内的变量值
Ctrl-Alt-Break暂时停止调试会话中所有进程的执行。仅在运行模式下可用
Ctrl-Alt-B显示断点对话框,您可以在其中添加和修改断点
Ctrl-Alt-C显示调用堆栈窗口以显示当前执行线程的所有活动过程或堆栈帧的列表。仅在中断模式下可用
Ctrl-Shift-F9清除项目中的所有断点
Ctrl-Alt-D显示反汇编窗口
Ctrl-F9启用或禁用当前代码行上的断点。该行必须已经有一个断点才能工作
Ctrl-Alt-E显示例外对话框
Ctrl-Alt-I显示立即窗口,您可以在其中计算表达式并执行单个命令
Ctrl-Alt-V, L显示 Locals 窗口以查看堆栈帧中当前选定过程的变量及其值
Ctrl-Alt-M, 1显示内存 1 窗口以查看正在调试的进程中的内存。当您正在查看的代码没有可用的调试符号时,这特别有用。它还有助于查看在 Watch 或 Variables 窗口中无法清晰显示的大型缓冲区、字符串和其他数据
Ctrl-Alt-M, 2显示内存 2 窗口
Ctrl-Alt-M, 3显示内存 3 窗口
Ctrl-Alt-M,4显示内存 4 窗口
Ctrl-Alt-U显示“模块”窗口,可让您查看程序加载的 .dll 或 .exe 文件。在多进程调试中,您可以右键单击并选择所有程序的显示模块
Ctrl-B打开新断点对话框
Ctrl-Alt-Q显示带有所选表达式的当前值的快速监视对话框。仅在中断模式下可用。使用此命令检查您尚未定义监视表达式的变量、属性或其他表达式的当前值
Ctrl-Alt-G显示寄存器窗口,其中显示 CPU 寄存器内容
Ctrl-Shift-F5终止当前调试会话,必要时重建,然后启动新的调试会话。在中断和运行模式下可用
Ctrl-Alt-N显示正在运行的文档窗口,该窗口显示您正在调试的 HTML 文档集。在中断和运行模式下可用
Ctrl-F10开始或恢复代码的执行,然后在到达所选语句时停止执行。如果调试器尚未运行,这将启动调试器
Ctrl-Shift-F10将执行点设置为您选择的代码行
Alt-NUM *突出显示要执行的下一条语句
F5如果当前没有调试,这将运行启动项目或项目并附加调试器。如果处于中断模式,则允许继续执行(即,它返回到运行模式)。
Ctrl-F5在不调用调试器的情况下运行代码。对于控制台应用程序,这还会安排控制台窗口在程序完成时保持打开状态并显示“按任意键继续”提示
F11一次执行一个语句,将执行跟踪到函数调用
Shift-F11执行当前执行点所在的函数的剩余行
F10执行下一行代码但不进入任何函数调用
Shift-F5在中断和运行模式下可用,这会终止调试会话
Ctrl-Alt-V,T显示 This 窗口,允许您查看与当前方法关联的对象的数据成员
Ctrl-Alt-H显示线程窗口以查看当前进程的所有线程
F9在当前行设置或删除断点
Ctrl-F11显示当前源文件的反汇编信息。仅在中断模式下可用
Ctrl-Alt-W, 1显示 Watch 1 窗口以查看变量值或观察表达式
Ctrl-Alt-W,2显示 Watch 2 窗口
Ctrl-Alt-W,3显示 Watch 3 窗口
Ctrl-Alt-W,4显示 Watch 4 窗口
Ctrl-Alt-P显示“进程”对话框,允许您将调试器附加或分离到一个或多个正在运行的进程



对象浏览器

捷径描述
Alt-F12显示“查找符号”对话框
Ctrl-F12在代码中显示所选符号的声明
F12显示代码中选定符号的定义
Ctrl-Alt-F12显示查找符号结果窗口
Ctrl-Alt-J显示对象浏览器以查看项目中定义或项目引用的组件和类型库定义的类、属性、方法、事件和常量
Alt-+在对象浏览器的选择历史记录中移回之前选择的对象
Shift-Alt-+向前移动到对象浏览器的选择历史记录中的下一个对象



工具窗口

捷径描述
Ctrl-Shift-M切换命令窗口进入或退出允许选择窗口内文本的模式
Ctrl-Shift-C显示类视图窗口
Ctrl-Alt-A显示命令窗口,您可以在其中键入操作 IDE 的命令
Ctrl-Alt-T显示“文档大纲”窗口以查看当前文档的平面或分层大纲
Ctrl-Alt-F显示收藏夹窗口,其中列出了网页的快捷方式
Ctrl-Alt-O显示输出窗口以在运行时查看状态消息
F4显示“属性”窗口,其中列出了当前选定项的设计时属性和事件
Shift-F4显示当前选定项目的属性页。(例如,使用它来显示项目的设置。)
Ctrl-Shift-E显示资源视图窗口
Ctrl-Alt-S显示服务器资源管理器窗口,允许您查看和操作数据库服务器、事件日志、消息队列、Web 服务和许多其他操作系统服务
Ctrl-Alt-R显示 Web 浏览器窗口,允许您查看 Internet 上的页面
Ctrl-Alt-L显示解决方案资源管理器,其中列出了当前解决方案中的项目和文件
Ctrl-Alt-K显示任务列表窗口,其中显示任务、注释、快捷方式、警告和错误消息
Ctrl-Alt-X显示工具箱,其中包含可以拖入编辑器和设计器窗口的控件和其他项目



Html 编辑器(设计视图)

捷径描述
Ctrl-B在粗体和正常之间切换选定的文本
Ctrl-Shift-T将选定段落减少一个缩进单位
Ctrl-T将所选段落缩进一个缩进单位
Ctrl-I在斜体和正常之间切换选定的文本
Ctrl-Shift-K防止绝对定位的元素被无意移动。如果元素已被锁定,则将其解锁
Ctrl-G切换网格
Ctrl-Shift-G指定使用不可见网格对齐元素。您可以在“选项”对话框的 HTML 设计器选项的“设计”窗格中设置网格间距,下次打开文档时将更改网格
Ctrl-U在带下划线和正常之间切换选定的文本
Ctrl-Shift-L显示书签对话框
Ctrl-J在当前 HTML 文档中插入 <div></div>
Ctrl-L选择文本时,显示“超链接”对话框
Ctrl-Shift-W显示“插入图像”对话框
Ctrl-Alt-向上箭头在表格中的当前行上方添加一行
Ctrl-Alt-下箭头在表格中的当前行下方添加一行
Ctrl-Alt-左箭头在表中当前列的左侧添加一列
Ctrl-Alt-右箭头在表中当前列的右侧添加一列
Ctrl-Shift-Q切换没有可视化表示的 HTML 元素的标记图标的显示,例如绝对定位元素的注释、脚本和锚点
Ctrl-Page Down从设计视图切换到 HTML 视图,反之亦然
Ctrl-Q在支持 BORDER 属性并将其设置为零的 HTML 元素周围显示 1 像素边框,例如表格、表格单元格和分区



捷径描述
Alt-F8显示宏资源管理器窗口,其中列出了所有可用的宏
Alt-F11启动宏 IDE
Ctrl-Shift-R将环境置于宏录制模式或完成录制(如果已处于录制模式)
Ctrl-Shift-P播放录制的宏

来自  https://www.dofactory.com/visual-studio-shortcuts


普通分类: