Home  >  Article  >  Backend Development  >  Tips for using Visual Studio

Tips for using Visual Studio

巴扎黑
巴扎黑Original
2017-04-29 17:28:001485browse

There is a joke about Microsoft Office, saying that it has too many features:

Just when you think you've discovered a new feature of Office, it's been around for years.

This article will introduce some useful but overlooked tips in Visual Studio (free download).

Use CTRL+; Search Solution Explorer

You can click on the Solution Explorer text box (or use the shortcut "CTRL+;") to search for all nodes - whether hidden or visible.

Searchable even if deeply folded. Search results remain until you clear the search box.

Quickly open

via CTRL+Q If there's a feature that everyone should use, but no one actually uses, it should be quick opening.

Generally speaking, we use menus to find a function, such as opening tools... options... etc.

Just press Ctrl+Q and enter the keyword. For example, to change the font size:

Another example, what if you want to compare files? Do you know that VS also has this function?

You can also find a NuGet package faster than NuGet Dialog:

Just use this feature for a few days and you'll develop a habit. You will thank yourself in the future.

Show overview in scrollbar

What I like most is when I show people some features and they look surprised that "this function even exists." Find "map mode" in Quick Open, then open it, and you can see this effect.

Your scroll bar can display a thumbnail when you hover over it to help you navigate your files.

TAB management

This is how most people use TAB tabs:

  1. Open a TAB


  2. Repeat the above


  3. There are too many TABs opened, it’s confusing


  4. Close all TAB


  5. Back to 0

You can use "fixed tabs" and "tab preview".

You can pin commonly used tabs, and then when closing, no longer select "Close all tabs" but "Close tabs except pinned tabs"

In addition, if you want to view a file, do not always double-click to open a file in the explorer, which will open a new tab. Using a standalone machine, a preview can be generated on the right. This way you won't clutter the tabs.

Use CTRL+to locate

This is undoubtedly the most prominent feature in this article. Why use mouse positioning? Press Ctrl+, enter a file, member variable or function, select it from the pop-up menu, and then navigate to that place.

If you know the name of what you're looking for, you don't need to use Explorer at all. Use Ctrl+, which is faster.

Use keyboard to move code

Visual Studio is not Emacs or Vim (unless you want it to be VSVim), but there are some advanced features that people generally don't know about.

You can move code using alt+up and down keys, which is rarely used in practice. You can also directly use the Shift+Select keys to select the code and then move it.

You can also use block selection: hold Alt and drag, so you can edit several lines at the same time.

Maybe you already know these features, or maybe you learned something. I think it's more important to realize that there are a lot of features out there waiting to be discovered. Do you have any little-known tricks?

Original text: Visual Studio’s most useful (and underused) tips

The above is the detailed content of Tips for using Visual Studio. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn