1. Peek View
Quickly view and edit the code of a function without creating a new tab.
In the past, to see the implementation of a function, you need to click on the F12 to jump to the function, in fact, this is a waste of time. Vs2013peek view solves this problem. Under Move the cursor to a function, press ALT+F12.
To use: Under the cursor moves to a function, press alt+f12.
You can see that there is an implementation of the current function on the current page. You can then continue to press ALT+F12 in the Peek window. Then press ctrl+alt+-, or ctrl+alt++ to jump back and forth. Press ESC to close the Peek form. This will not need to jump back and forth ... (Alt+g can jump to the function definition, ALT + LEFT arrow can fallback)
2. Preview the entire file like sublime text in the scroll bar
On
Then, when you move the mouse over the scroll bar, a preview is displayed:
Settings: scroll bar, all languages, text Editor, tools, Options.
Then set the following:
3. The selected code is nested with the IF statement.
Well, this is a pretty old function ... Because the shortcut keys have not been remembered before, so very few.
How to use: Select the code you want to nest, press the shortcut key ctrl+k,ctrl+s:
And then it becomes this:
4. Task List
When you write code, you often use TODO to write down what you do later in the comments, lest you forget :
1 if (is_running) 2 {3 // todo:do something ... 4 }
Then, when looking for these todo, we used a simple lookup function. However, there is a dedicated Task List window to manage these todo (i.e. tasks) in vs.
This window is hidden by default. You can display this window by tapping the task list, other Windows, view , and so on.
Then select Comments (for example) in the form:
You can list these tasks:
PS. Note using the "HACK" tag is also possible. But I don't know what this is. See MSDN: Create a Task List comment in detail
VS2013 Common shortcut keys:
1. Go back to the previous cursor position/advance to the next cursor position
1) Go back to the previous cursor position: Use the combo key "Ctrl +-";
2) advance to the next cursor position: "Ctrl + Shift +-".
2. Copy/cut/delete entire line of code
1) If you want to copy a whole line of code, just move the cursor to that line, and then use the combo key "CTRL + C" to complete the copy operation without selecting the entire row.
2) If you want to cut a whole line of code, simply move the cursor to that line, and then use the combo key "Ctrl+x" to complete the cut without selecting the entire row.
3) If you want to delete a whole line of code, simply move the cursor to that line, and then use the combo key "Ctrl+l" to complete the cut without selecting the entire row.
3. Revocation/anti-revocation
1) Revoke: Use the combination key "Ctrl + Z" to cancel the operation;
2) Anti-revocation: Use the combo key "Ctrl+y" for anti-undo operation.
4. Forward/Backward Search
1) Use the combination key "Ctrl+i";
2) Type the text you want to search (move the cursor to the search Word input box to start typing);
3) After you type the search text, you can use the combination key "Ctrl+i" and "ctrl+shift+i" to locate the search results before and after the search results are highlighted.
4) to end the search, you can press the "ESC" key or click the Close button on the right side of the Find box.
[Supplemental] After selecting a word, pressing the combo key "Ctrl+f" also brings up the lookup box, and the search results are highlighted.
5. Box-Type selection
Use the combo key "shift+alt+ arrow keys (or mouse)" To complete the box selection. Box selection allows you to select both lines of code and columns. This is very handy for deleting some code in bulk.
6. Insert a row above or below the line where the cursor is located
1) key combination "Ctrl+enter": Insert a blank line above the current line;
2) key combination "Ctrl+shift+enter": Inserts a blank line below the current line.
7. Navigate to the beginning and end of the line
1) Home key: Navigates to the beginning of the current line;
2) End key: Navigates to the end of the line at the current line.
8. Select the code between the start of the cursor and the beginning of the line (tail)
1) Select the code from the cursor to the beginning of the line: Use the combo key "Cshift + Home";
2) Select the code from the cursor to the end of the line: Use the key combination "Shift + END".
9. Quick Insert Code block
Please refer to my other article.
10. Invoke Smart Hints
1) Method 1: Use the combination key "Ctrl+j";
2) Method 2: Use the composite key "alt+→".
11. Calling parameter information hints
For some functions with large functions, it is difficult to easily confirm the use of parameters within the function. At this point you can put the cursor on the parameter name, and then press the key combination "ctrl+shif+ space", where the parameters are used will be highlighted.
12. Quick Switch Window
Use the combo Key "Ctrl+tab" (You can now open the IDE's navigation to get a bird's eye view).
13. Quickly hide or show the current code snippet
Use the combo Key "Ctrl+m,m" (Remember: to press two times M OH).
14. Build a solution
Use the combo key "Ctrl+shift+b".
15. Jump to a specified line
1) Method 1: Combination key "Ctrl+g";
2) Method 2: Click the line number in the status bar.
16. Commenting/Canceling comments
1) Note: Combination key "Ctrl+k+c";
2) Uncomment: Combine key "Ctrl+k+u".
17. Full Screen Display/exit full screen display
Use the combo key "SHIFT + ALT + ENTER".
18. Definitions and references
1) Jump to Definition: F12;
2) Find All references: Use the combo key "Shift+f12".
19. Find and replace
1) Find: Use the combination key "Ctrl+f";
2) Replace: Use the combo key "Ctrl+h".
20. Case Conversion
1) Turn lowercase: Use the combination key "Ctrl + U";
2) Capitalize: Use the combo key "CTRL + SHIFT + U".
21. Debugging related
1) Commissioning (start): F5;
2) Debug (reboot): Use combination key "Ctrl+shift+f5";
3) Debug (Start Without Debugging): Use the combination key "Ctrl+f5";
4) Debug (statement-by-sentence): F11;
5) Commissioning (step by Step): F10;
6) Set breakpoint: F9.
VS2013 Usage Tips Summary