欢迎各位兄弟 发布技术文章
这里的技术是共享的
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". 相同,下一个 多单词
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"
}
扩选 扩大 扩展
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
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-X or Shift-Delete | Cuts the currently selected item to the clipboard. Without selection it cuts the entire line to the clipboard. |
Ctrl-C or Ctrl-Insert | Copies the currently selected item to the clipboard. Without selection it copies the entire line to the clipboard. |
Ctrl-V or Shift-Insert | Pastes 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-Backspace | Undo previous editing action |
Ctrl-Y or Ctrl-Shift-Z | Redo the previous undo action |
Ctrl-Shift-V or Ctrl-Shift-Insert | Pastes 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+F10 | Opens smart tag and resolves a wide array of suggested code refactorings |
Esc | Closes a menu or dialog, cancels an operation in progress, or places focus in the current document window |
Ctrl-S | Saves the selected files in the current project (usually the file that is being edited) |
Ctrl-Shift-S | Saves all documents and projects |
Ctrl-P | Displays the Print dialog |
F7 | Switches from the design view to the code view in the editor |
Shift-F7 | Switches from the code view to the design view in the editor |
F8 | Moves the cursor to the next item, for example in the TaskList window or Find Results window |
Shift-F8 | Moves the cursor to the previous item, for example in the TaskList window or Find Results window |
Shift-F12 | Finds a reference to the selected item or the item under the cursor |
Ctrl-Shift-G | Opens 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-F12 | Moves to the next task in the TaskList window |
Ctrl-Shift-8 | Moves backward in the browse history. Available in the object browser or Class View window |
Alt-Left Arrow | Go back in the web browser history |
Alt-Right Arrow | Go forward in the web browser history |
SHORTCUT | DESCRIPTION |
---|---|
Left Arrow | Moves the cursor one character to the left |
Right Arrow | Moves the cursor one character to the right |
Down Arrow | Moves the cursor down one line |
Up Arrow | Moves the cursor up one line |
Page Down | Scrolls down one screen in the editor window |
Page Up | Scrolls up one screen in the editor window |
End | Moves the cursor to the end of the current line |
Home | Moves 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-End | Moves the cursor to the end of the document |
Ctrl-Home | Moves the cursor to the start of the document |
Ctrl-G | Displays 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-N | Moves to the next bookmark in the document |
Ctrl-K, Ctrl-P | Moves to the previous bookmark |
Ctrl-K, Ctrl-I | Displays Quick Info, based on the current language |
Ctrl-Down Arrow | Scrolls 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 Arrow | Scrolls text up one line but does not move the cursor. Available only in text editors |
Ctrl-Right Arrow | Moves the cursor one word to the right |
Ctrl-Left Arrow | Moves the cursor one word to the left |
Ctrl-Shift-1 | Navigates 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-2 | Navigates to the previous definition, declaration, or reference of an item |
SHORTCUT | DESCRIPTION |
---|---|
Enter | Inserts a new line |
Delete | Deletes one character to the right of the cursor |
Insert | Toggles between insert and overtype insertion modes |
Tab | Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop |
Shift-Tab | Moves current line or selected lines one tab stop to the left |
Backspace or Shift-Backspace | Deletes one character to the left of the cursor |
Ctrl-K, Ctrl-C | Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language |
Ctrl-K, Ctrl-U | Removes the comment syntax from the current line or currently selected lines of code |
Ctrl-T or Shift-Enter | Swaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors |
Ctrl-K, Ctrl-L | Removes all unnamed bookmarks in the current document |
Ctrl-M, Ctrl-O | Automatically 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-Spacebar | Displays 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-F | Applies 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-L | Cuts all selected lines or the current line if nothing has been selected to the clipboard |
Ctrl-Shift-L | Deletes all selected lines or the current line if no selection has been made |
Ctrl-Enter | Inserts a blank line above the cursor |
Ctrl-Shift-Enter | Inserts a blank line below the cursor |
Shift-Alt-T | Moves the line containing the cursor below the next line |
Ctrl-J | Lists members for statement completion when editing code |
Ctrl-U | Changes the selected text to lowercase characters |
Ctrl-Shift-U | Changes the selected text to uppercase characters |
Ctrl-Shift-Spacebar | Displays a tooltip that contains information for the current parameter, based on the current language |
Ctrl-M, Ctrl-U | Removes the outlining information for the currently selected region |
Ctrl-M, Ctrl-P | Removes all outlining information from the entire document |
Ctrl-R, Ctrl-P | Swaps the anchor and endpoint of the current selection |
Ctrl-M, Ctrl-L | Toggles all previously marked hidden text sections between hidden and display states |
Ctrl-K, Ctrl-K | Sets or removes a bookmark at the current line |
Ctrl-M, Ctrl-M | Toggles 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-H | Sets or removes a shortcut in the tasklist to the current line |
Ctrl-R, Ctrl-R | Enables or disables word wrap in an editor |
Ctrl-R, Ctrl-W | Shows or hides spaces and tab marks |
Ctrl-Delete | Deletes the word to the right of the cursor |
Ctrl-Backspace | Deletes the word to the left of the cursor |
Ctrl-Shift-T | Transposes 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. |
SHORTCUT | DESCRIPTION |
---|---|
Shift-Left Arrow | Moves the cursor to the left one character, extending the selection |
Shift-Alt-Left Arrow | Moves the cursor to the left one character, extending the column selection |
Shift-Right Arrow | Moves the cursor to the right one character, extending the selection |
Shift-Alt-Right Arrow | Moves the cursor to the right one character, extending the column selection |
Ctrl-Shift-End | Moves the cursor to the end of the document, extending the selection |
Ctrl-Shift-Home | Moves 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 Arrow | Moves the cursor down one line, extending the selection |
Shift-Alt-Down Arrow | Moves the cursor down one line, extending the column selection |
Shift-End | Moves the cursor to the end of the current line, extending the selection |
Shift-Alt-End | Moves the cursor to the end of the line, extending the column selection |
Shift-Home | Moves the cursor to the start of the line, extending the selection |
Shift-Alt-Home | Moves the cursor to the start of the line, extending the column selection |
Shift-Up Arrow | Moves the cursor up one line, extending the selection |
Shift-Alt-Up Arrow | Moves the cursor up one line, extending the column selection |
Shift-Page Down | Extends selection down one page |
Shift-Page Up | Extends selection up one page |
Ctrl-A | Selects everything in the current document |
Ctrl-W | Selects 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 Down | Moves the cursor to the last line in view, extending the selection |
Ctrl-Shift-Page Up | Moves the cursor to the top of the current window, extending the selection |
Ctrl-Shift-Alt-Right Arrow | Moves the cursor to the right one word, extending the column selection |
Ctrl-Shift-Left Arrow | Moves the cursor one word to the left, extending the selection |
Ctrl-Shift-Alt-Left Arrow | Moves the cursor to the left one word, extending the column selection |
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-Shift-B | Builds the solution |
Ctrl-N | Displays 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-N | Displays the New Project dialog |
Ctrl-O | Displays the Open File dialog |
Ctrl-Shift-O | Displays the Open Project dialog |
Shift-Alt-A | Displays the Add Existing Item dialog |
Ctrl-Shift-A | Displays the Add New Item dialog |
Ctrl-Alt-Insert | Allows you to override base class methods in a derived class when an overridable method is highlighted in the Class View pane |
SHORTCUT | DESCRIPTION |
---|---|
Shift-Alt-Enter | Toggles 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-F4 | Closes the current MDI child window |
Shift-Esc | Closes the current tool window |
Ctrl-F2 | Moves the cursor to the navigation bar at the top of a code view |
Ctrl-Tab | Cycles through the MDI child windows one window at a time |
Ctrl-F6,Ctrl-Shift-Tab | Moves to the previous MDI child window |
Alt-F6,Ctrl-Shift-F6 | Moves to the next tool window |
Shift-Alt-F6 | Moves to the previously selected window |
F6 | Moves to the next pane of a split pane view of a single document |
Shift-F6 | Moves to the previous pane of a document in split pane view |
Ctrl-Pagedown | Moves 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-PageUp | Moves to the previous tab in the document or window |
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-Down Arrow | Moves the selected control down in increments of one on the design surface |
Down Arrow | Moves the selected control down to the next grid position on the design surface |
Ctrl-Left Arrow | Moves the control to the left in increments of one on the design surface |
Left Arrow | Moves the control to the left to the next grid position on the design surface |
Ctrl-Right Arrow | Moves the control to the right in increments of one on the design surface |
Right Arrow | Moves the control to the right into the next grid position on the design surface |
Ctrl-Up Arrow | Moves the control up in increments of one on the design surface |
Up Arrow | Moves the control up into the next grid position on the design surface |
Tab | Moves to the next control in the tab order |
Shift-Tab | Moves to the previous control in the tab order |
Ctrl-Shift-Down Arrow | Increases the height of the control in increments of one on the design surface |
Shift-Down Arrow | Increases the height of the control to the next grid position on the design surface |
Ctrl-Shift-Left Arrow | Reduces the width of the control in increments of one on the design surface |
Shift-Left Arrow | Reduces the width of the control to the next grid position on the design surface |
Ctrl-Shift-Right Arrow | Increases the width of the control in increments of one on the design surface |
Shift-Left Arrow | Increases the width of the control to the next grid position on the design surface |
Ctrl-Shift-Up Arrow | Decreases the height of the control in increments of one on the design surface |
Shift-Up Arrow | Decreases the height of the control to the next grid position on the design surface |
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-F | Displays the Find dialog |
Ctrl-Shift-F | Displays the Find in Files dialog |
F3 | Finds the next occurrence of the previous search text |
Ctrl-F3 | Finds the next occurrence of the currently selected text or the word under the cursor if there is no selection |
Shift-F3 | Finds the previous occurrence of the search text |
Ctrl-Shift-F3 | Finds the previous occurrence of the currently selected text or the word under the cursor |
Ctrl-D | Places the cursor in the Find/Command line on the Standard toolbar |
Alt-F3, H | Selects or clears the Search Hidden Text option for the Find dialog |
Ctrl-I | Starts 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, C | Selects or clears the Match Case option for Find and Replace operations |
Alt-F3, R | Selects or clears the Regular Expression option so that special characters can be used in Find and Replace operations |
Ctrl-H | Displays the Replace dialog |
Ctrl-Shift-H | Displays the Replace in Files dialog |
Ctrl-Shift-I | Performs an incremental search in reverse direction |
Alt-F3, S | Halts the current Find in Files operation |
Alt-F3, B | Selects or clears the Search Up option for Find and Replace operations |
Alt-F3, W | Selects or clears the Match Whole Word option for Find and Replace operations |
Alt-F3, P | Selects or clears the Wildcard option for Find and Replace operations |
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-Alt-F1 | Displays the Contents window for the documentation |
Ctrl-F1 | Displays 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 |
F1 | Displays 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-F2 | Displays the Help Index window |
Shift-Alt-F2 | Displays the Index Results window, which lists the topics that contain the keyword selected in the Index window |
Alt-Down Arrow | Displays the next topic in the table of contents. Available only in the Help browser window |
Alt-Up Arrow | Displays the previous topic in the table of contents. Available only in the Help browser window |
Ctrl-Alt-F3 | Displays the Search window, which allows you to search for words or phrases in the documentation |
Shift-Alt-F3 | Displays the Search Results window, which displays a list of topics that contain the string searched for from the Search window. |
Shift-F1 | Displays a topic from Help that corresponds to the user interface item that has the focus |
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-Alt-V, A | Displays 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-Break | Temporarily stops execution of all processes in a debugging session. Available only in run mode |
Ctrl-Alt-B | Displays the Breakpoints dialog, where you can add and modify breakpoints |
Ctrl-Alt-C | Displays 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-F9 | Clears all of the breakpoints in the project |
Ctrl-Alt-D | Displays the Disassembly window |
Ctrl-F9 | Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to work |
Ctrl-Alt-E | Displays the Exceptions dialog |
Ctrl-Alt-I | Displays the Immediate window, where you can evaluate expressions and execute individual commands |
Ctrl-Alt-V, L | Displays the Locals window to view the variables and their values for the currently selected procedure in the stack frame |
Ctrl-Alt-M, 1 | Displays 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, 2 | Displays the Memory 2 window |
Ctrl-Alt-M, 3 | Displays the Memory 3 window |
Ctrl-Alt-M, 4 | Displays the Memory 4 window |
Ctrl-Alt-U | Displays 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-B | Opens the New Breakpoint dialog |
Ctrl-Alt-Q | Displays 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-G | Displays the Registers window, which displays CPU register contents |
Ctrl-Shift-F5 | Terminates the current debugging session, rebuilds if necessary, and then starts a new debugging session. Available in break and run modes |
Ctrl-Alt-N | Displays 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-F10 | Starts 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-F10 | Sets the execution point to the line of code you choose |
Alt-NUM * | Highlights the next statement to be executed |
F5 | If 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-F5 | Runs 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 |
F11 | Executes code one statement at a time, tracing execution into function calls |
Shift-F11 | Executes the remaining lines of a function in which the current execution point lies |
F10 | Executes the next line of code but does not step into any function calls |
Shift-F5 | Available in break and run modes, this terminates the debugging session |
Ctrl-Alt-V, T | Displays the This window, which allows you to view the data members of the object associated with the current method |
Ctrl-Alt-H | Displays the Threads window to view all of the threads for the current process |
F9 | Sets or removes a breakpoint at the current line |
Ctrl-F11 | Displays the disassembly information for the current source file. Available only in break mode |
Ctrl-Alt-W, 1 | Displays the Watch 1 window to view the values of variables or watch expressions |
Ctrl-Alt-W, 2 | Displays the Watch 2 window |
Ctrl-Alt-W, 3 | Displays the Watch 3 window |
Ctrl-Alt-W, 4 | Displays the Watch 4 window |
Ctrl-Alt-P | Displays the Processes dialog, which allows you to attach or detach the debugger to one or more running processes |
SHORTCUT | DESCRIPTION |
---|---|
Alt-F12 | Displays the Find Symbol dialog |
Ctrl-F12 | Displays the declaration of the selected symbol in the code |
F12 | Displays the definition for the selected symbol in code |
Ctrl-Alt-F12 | Displays the Find Symbol Results window |
Ctrl-Alt-J | Displays 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 |
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-Shift-M | Toggles the Command window into or out of a mode allowing text within the window to be selected |
Ctrl-Shift-C | Displays the Class View window |
Ctrl-Alt-A | Displays the Command window, which allows you to type commands that manipulate the IDE |
Ctrl-Alt-T | Displays the Document Outline window to view the flat or hierarchical outline of the current document |
Ctrl-Alt-F | Displays the Favorites window, which lists shortcuts to web pages |
Ctrl-Alt-O | Displays the Output window to view status messages at runtime |
F4 | Displays the Properties window, which lists the design-time properties and events for the currently selected item |
Shift-F4 | Displays the property pages for the item currently selected. (For example, use this to show a project's settings.) |
Ctrl-Shift-E | Displays the Resource View window |
Ctrl-Alt-S | Displays 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-R | Displays the web browser window, which allows you to view pages on the Internet |
Ctrl-Alt-L | Displays the Solution Explorer, which lists the projects and files in the current solution |
Ctrl-Alt-K | Displays the TaskList window, which displays tasks, comments, shortcuts, warnings, and error messages |
Ctrl-Alt-X | Displays the Toolbox, which contains controls and other items that can be dragged into editor and designer windows |
SHORTCUT | DESCRIPTION |
---|---|
Ctrl-B | Toggles the selected text between bold and normal |
Ctrl-Shift-T | Decreases the selected paragraph by one indent unit |
Ctrl-T | Indents the selected paragraph by one indent unit |
Ctrl-I | Toggles the selected text between italic and normal |
Ctrl-Shift-K | Prevents an absolutely positioned element from being inadvertently moved. If the element is already locked, this unlocks it |
Ctrl-G | Toggles the grid |
Ctrl-Shift-G | Specifies 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-U | Toggles the selected text between underlined and normal |
Ctrl-Shift-L | Displays the Bookmark dialog |
Ctrl-J | Inserts <div></div> in the current HTML document |
Ctrl-L | When text is selected, displays the Hyperlink dialog |
Ctrl-Shift-W | Displays the Insert Image dialog |
Ctrl-Alt-Up Arrow | Adds one row above the current row in the table |
Ctrl-Alt-Down Arrow | Adds one row below the current row in the table |
Ctrl-Alt-Left Arrow | Adds one column to the left of the current column in the table |
Ctrl-Alt-Right Arrow | Adds one column to the right of the current column in the table |
Ctrl-Shift-Q | Toggles 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 Down | Switches from design view to HTML view and vice versa |
Ctrl-Q | Displays 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 |
SHORTCUT | DESCRIPTION |
---|---|
Alt-F8 | Displays the Macro Explorer window, which lists all available macros |
Alt-F11 | Launches the macros IDE |
Ctrl-Shift-R | Places the environment in macro record mode or completes recording if already in record mode |
Ctrl-Shift-P | Plays back a recorded macro |
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 | 显示工具箱,其中包含可以拖入编辑器和设计器窗口的控件和其他项目 |
捷径 | 描述 |
---|---|
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