More efficient use of Visual Studio (1)

Source: Internet
Author: User

To do well, you must first sharpen your tools. Although vim and Emacs are artifactsProgramStaff, we can also use some shortcut keys and some potential functions to write them out of the mouse.CodeTo improve work efficiency. Use Visual Studio like vim.

Of course, if you want to use Visual Studio just like vim, you can install this plug-in: vsvim, which only supports vs2010 +.

Below I will summarize some of the shortcut keys and usage skills that I think you may not know at ordinary times but are very useful. If you are a Daniel, you don't need to watch it. Haha. Personal Knowledge is limited. If you have any more useful Shortcut Keys, please share them. Unlike vim, which has the normal and insert modes, the vs shortcut key requires a lot of Ctrl, shift, and ALT participation. This disadvantage is that it is likely to conflict with the shortcut keys of some programs on your computer. I don't know why some shortcut keys of Visual Studio on different computers may be different, so some shortcut keys may be unavailable on your computer, Google it. My current method is to synchronize the configurations I am familiar with to all the Visual Studio I use to ensure that the shortcut keys are the same for each version I use.

These shortcut keys are hard to remember at first, but my method is to write down what I think is useful, and then I will use this function next time to restrain myself from using the mouse, check the shortcut key. After a few times, you will remember.

I. Themes

You may wonder why the first one is such a thing. Of course! We have to write code to vs all day, debug, and default vs color. Have you been bored for a long time? What's wrong with your eyes? Choosing a theme that suits you can both protect your eyesight and make your mood pleasant. By the way, it is not good to improve your work efficiency!

If you are still using the default theme, change it. We recommend a website that provides the vs color scheme: studiostyles. The domain name is the same as the website name: http://studiostyl.es /. The following is my topic. I feel very comfortable and harmonious.

 

2. More effective use of the Editor

The editor is the place where you write code.

More effective clipboard

1. Cyclic clipboard:Shift+CTRL+V. In vs, multiple copies are saved. You only need to call this shortcut key to paste the previous multiple copies.

2. Cut the entire line:CTRL+X. Press the shortcut key to cut the entire line.CTRL+LYou can also cut the entire row. The difference is that after Ctrl + X is used, the cursor will be placed at the end of the next row.CTRL+LThe cursor will stop at the beginning of the next line.

3. Full row replication:CTRL+C. AndCTRL+X.

 

More effective options:

1. Basic selection:Shift+ Cursor (BytesBytesBytes→). Hold down the cursor based on the positionShiftThen you can use the cursor to select the top, bottom, left, and right.

2. Word-based selection:Shift+CTRL+ (→Bytes). You can use this option to select or use it together.Home/EndSelect entire line

3. Select based on "square:Shift+ALT+ (BytesBytesBytes→) OrALT+ Mouse.

4. Select an entire word:Shift+CTRL+W. Press the shortcut key when placing the cursor in a word.

 

More effective Editing:

1. Delete the entire row:Shift+Delete.

2. Delete the next word:CTRL+Delete.

3. Delete the previous word:CTRL+ Return (Backspace)

 

More effective location jump:

1. Word-based jump:CTRL+ (Bytes→). This shortcut key allows the cursor to jump around words.

2. Jump to the previous word:Shift+CTRL+ (BytesBytes). This function is useful. You can move the cursor to the word where the cursor is located last time or next time it appears in the text.

 

3. Jump to the position where the cursor stays:CTRL+-(Forward );CTRL+Shift+-(Later)

4. Quickly jump to a line:CTRL+G 

5. Quickly jump to the beginning and end of the file:CTRL+Home/End 

6. Quickly jump to the first non-space beginning with this line:Home. If you want to start at the beginning of the line, double-clickHomeYou can.

7. Quickly jump to the end of the line:End 

8. Move matching brackets:CTRL+], Applicable(),{},[],"". Place the cursor in the brackets that need to be matched, and then press the shortcut key, the cursor will jump to the brackets relative to it. This function is useful, but I have another suggestion. Visual Studio will mark the corresponding parentheses, but the default color is not similar to the background color, we recommend that you set it to a highlighted color in font and colors. The matching setting in the brackets does not know what the Chinese character is. You can find it after looking for it.

 

After the settings are completed, the effect is as follows. Is it very eye-catching? In this way, you can quickly find the corresponding one in the brackets.

 

Summary

If you need to find a shortcut key that you don't know, you can view it on the menu bar. Generally, the shortcut key is usually placed on the menu side. Or you can go to msdn to check: http://msdn.microsoft.com/en-us/library/vstudio/dd576362.aspx. I think it is very necessary to look at some materials similar to the efficient use of Vs, because many times if you do not know the existence of some functions, you will not expect to use this function, let alone search for it.

There are a lot of other tips in the editor. Write a part first. This is only a small part. There are also a lot of other tips to come and try again later.. In the future, we may summarize some content about search, editing, debugging, navigation, and intelliisense.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.