工欲善其事, its prerequisite. While Vim and Emacs are artifacts, for programmers using Visual Studio, there are some shortcuts and potential features that enable us to write code out of the mouse, improve productivity, and use Visual Studio like Vim.
Of course, if you want to really use Visual Studio like vim to install this plugin: VsVim, only supports vs2010+.
I'll summarize some of the VS shortcuts and tips that I think people may not know very well. If you are Daniel that do not need to see, haha. Personal knowledge is limited if you have any more practical shortcut keys, Welcome to share. Because unlike vim there are normal,insert two modes, the feature of the VS shortcut is that it takes a lot of CTRL, Shift, and ALT to participate. This disadvantage is likely to be a certain program on your computer shortcut keys conflict. And don't know why some of the shortcut keys on different computers on Visual Studio may not be the same, so there might be some shortcuts that won't work on your PC, Google it. My current approach is to sync my familiar configuration to all of the Visual Studio I'm using to make sure that the shortcuts are the same between the versions I use.
These shortcuts are very difficult to remember, but my method is to feel useful to write down, and then the next time you want to use this function to refrain from using the mouse, to check the use of shortcut keys. You'll remember it after so many times.
I. Theme
You might be wondering why the first one is such a thing. Of course this is it! We're going to have to write code to VS, Debug, vs. default colors you see, it's boring. The eyes are hard to be affected by wood? Choose a suitable theme, both to protect the eyesight, but also to make their own mood, good mood in the way even work efficiency also improved is not very good!
If you're still using the default theme, quickly change it. Here's a website that offers a vs color scheme: Studiostyles, the name of the domain and the site: http://studiostyl.es/. Here is the theme I use, I feel very comfortable, very harmonious.
Second, more effective use of the editor
The editor here refers to the place where you write code.
More efficient shear Plates
1. Circular clipboard: Shift + Ctrl + v. In VS, multiple copies, in fact, VS will be saved, only need to call this shortcut to the previous multiple copies of the record can be pasted out.
2. Entire line cut: Ctrl + X. Do not select any text, and then press the shortcut key to cut the entire line. CTRL + L also allows the entire row to be cut, using the same method, except that the cursor will fall at the end of the next line after using CTRL + X, and the CTRL + L cursor will stop at the beginning of the next line.
3. Full line copy: Ctrl + C. This is the same as the CTRL + X use method.
More Effective options:
1. Basic selection: Shift + cursor (←↓↑→). Based on the location of the cursor, hold down SHIFT and use the left and right cursors to freely select.
2. Based on the word selection: Shift + Ctrl + (→←). Use this to jump the word selection, but also with Home/end to select the entire row
3. Based on "block" selection: Shift + ALT + (←↓↑→) or ALT + mouse.
4. Select an entire word: Shift + Ctrl + W. When you place your cursor in a word, press the shortcut key.
More efficient editing:
1. Delete entire row: Shift + DELETE.
2. Delete the next word: Ctrl + DELETE.
3. Delete the previous word: Ctrl + backspace (Backspace)
More efficient locations to jump:
1. Word-based jump: Ctrl + (←). This shortcut allows the cursor to jump around in words.
2. Skip to the previous word: Shift + Ctrl + (↓↑). This feature is useful for moving the cursor to the point where the word cursor was last or next in the text.
3. Skip to the previous cursor position: CTRL +-(forward); CTRL + Shift +-(back)
4. Jump to a line quickly: Ctrl + G
5. Quickly jump to the tail of the file: Ctrl + home/end
6. Quickly jump to the beginning of the first non-space of our bank: Home. If you want to go to the beginning of the bank, double-click Home.
7. Quickly jump to the end of the bank: end
8. Match Bracket Move: Ctrl +], apply to (), {}, [], "". Place the cursor in the parentheses that need to be matched and then press the shortcut, and the cursor jumps to its parenthesis relative to that. This feature is useful, but I have another suggestion. Visual Studio would have specifically identified the corresponding parentheses, but the general default of that color and background color is similar to the view, it is recommended to set it in the font and colors in the eye-catching color. That bracket matching settings, Chinese do not know what is, we should find out what should be found.
Set up after the effect is as follows, is not very eye-catching? This allows you to quickly find the one that corresponds to it in the parentheses group.
Third, continue the more efficient editor
3.1 More effective edits (supplemental)
A. Comment Code: CTRL + E (Edit) + C (Comment), CTRL + K + C (Comment). Open file type different behavior may be different, in the CS file type will be selected in the code comment of the row, CPP will be the selected content is commented.
Anti-Comment Code: CTRL + E (Edit) + U (uncomment), CTRL + K + U (uncomment)
B. Adjust format Check code format: Ctrl + E (Edit) + F (format).
C. Adjust the entire document code format: Ctrl + E (Edit) + D (document format).
3.2 More efficient Searches:
A. Incremental Search (incremental searches, do not know the proper translation): Ctrl + I (Incremental) (move to the next match press CTRL + I, move to the previous SHIFT + CTRL + I). Press and hold the shortcut key and enter the string you want to query, VS will immediately navigate to the confirmation process without the need for CTRL + F, which can be seen in the graph I cut. I generally use this search if I just want to do a simple search in the current document, and it's a bit more complicated to find the search criteria.
B. Ctrl + F (Find): In Visual Studio 2012, this feature is already similar to increment search, and you will find that using Ctrl + F in vs2012+ is the same as the effect above, which is the input to see the results. But unlike increment search, this search can specify more criteria, such as whether to match case, whether to search for whole words, whether to use regular expressions, and the scope of the search.
C. Find in File: Ctrl + Shift + F, this can be achieved by the search function is the same as CTRL + F, the only difference is that this can be the results of your search output to the Find Results window, rather than one display. This is a good place to search for some more matching things, and then in the output of the results window in the visual screening.
Iv. more efficient Navigation:
1. Quickly open solution Explorer:ctrl + W (Windows) + S (solution), Ctrl + Alt + L. You can use this Quick Open solution window to select files when you are writing code to open another file in the project.
2. Open the current Open file list: Ctrl+alt+down. This is very useful, but this shortcut will flip the screen on many computers, embarrassing. If you really want to use this function, you can do this by customizing the shortcut keys.
3. Quickly move the focus to the class list (this noun is purely yy, see the picture to know what I mean): Ctrl +f2.
4. Internal file switch: Ctrl + Tab. This feature is not only in VS, but in many software.
5. Fullscreen: Shift + Alt + Enter. Can let you into full-screen interference-free mode, I like this feature.
V. More effective IntelliSense
IntelliSense is inherently smart, but there are times when we want to force a few hints to look at the features that are cool. Many functional language descriptions may be tired, and because my language is not very likely you can not understand, so I will take the drawings.
1. List members. CTRL + K + L (List Member), CTRL + J. We know that when we need to access the object method, we press. VS will automatically indicate which methods are available, but sometimes we need to see them again if the. operator already exists. I used to delete the dots and then point it again, and I admitted that I was a fool, and later knew the shortcut was much better.
2. List the options (the description is not clear, specifically see the following). Ctrl +. or CTRL + Shift +F10. When we use some types in the assembly referenced by our project but not within the namespace referenced by the current file, or if we write a nonexistent function, that line of code will have an error, and there is a small symbol in the lower left corner. We have some help with moving the mouse around the symbol, which automatically helps us to add references or generate functions. This shortcut is for this prompt to appear without moving the mouse.
Vi. Other
1. Task list, you can open this window by View->task list. Many people may not know this function, I think it is very useful. I often encounter this situation when writing code, some code I am not sure of the need or feel that there may be problems in the future need to improve, I will add comments://todo:reason. Believing that many people will have the same habit, the function of this task list is to let us see how many todo items we have in our current project. Of course not limited to the word todo, you can customize the vocabulary. I usually take a look at this list before commit to see if there is any need to change the place. This can also directly add some tasks, specific use of their own to know.
Seven, plug-in
Here are two plugins recommended: C # outline and Smart Paster.
1. C # Outline
Visual Studio Default outline is only at the function level, but many times it is convenient to have some cyclic conditions that are long and need to be indented. So there's this plugin. The effect is as follows:
Before outline->
After outline->
2. Smart Paster
This plugin can paste text into comments, and string strings and StringBuilder. This is especially useful when pasting multiple lines of text.
Viii. Recommended Information
1. Favorite Visual Studio Keyboard Shortcuts:stackoverflow A group of people talking about their favorite shortcut keys, you can go inside to see maybe you will see some of your unexpected shortcut keys.
2. Visual Studio Programmer's motto: This book introduces a lot of knowledge about vs.
3. You can take a look at the VS menu bar those useless things, perhaps you will find something useful to you.
Summary
If you need to find a shortcut that you don't know, you can see it in the menu bar, and the shortcut keys are always placed on the menu side. Or you can go to MSDN and check it out: http://msdn.microsoft.com/en-us/library/vstudio/dd576362.aspx. I think it's very important to look at something similar to the efficient use of VS, because many times if you don't know the existence of a certain feature, you don't even have the idea to search for it.
There are a lot of other tricks in the editor, just a little part of it, and a lot of other tricks to get you started. You may also summarize some things about search, edit, Debug, navigate, IntelliSense, and so on.
Many of the more common shortcuts in the default settings are actually some abbreviations in the inside, this estimate is also MS help us remember. For example, the shortcut key of the comment code is CTRL + E + C, if we know it is CTRL + Edit + Comment code abbreviation is not better remember? I will also try to yy the shortcut keys and functions to help me remember. Many other features in the VS have multiple shortcut keys can be implemented, I guess is to prevent some of the shortcut key conflict design, I usually only remember, the conflict.
Summarize
These are just some of the most useful tips for me, and it's highly recommended that you take a look at the information I recommend to explore some of the features that are better suited to your habits. Because when you don't know the existence of this function, you simply can't imagine looking for such a function.
Let me say a few more words. There is absolutely no need to memorize a lot of shortcuts and then install them, because not all the shortcuts are needed by everyone. To a large extent, the use of some functions depends on your working habits, and I do not recommend you to remember some of the shortcuts you think you will not use, meaningless, wasting time. That's why I'm just listing some of the shortcuts that are really helpful to my productivity, rather than listing all of the shortcuts in Visual Studio, because that makes no sense!
So I strongly suggest that you only remember those things that you find useful.
The original link; http://www.uml.org.cn/net/201307222.asp
More efficient use of visual Studio