Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the new function of VSTS 2010 client IDE

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to use the new VSTS 2010 client IDE features, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

This article introduces a new feature of VSTS 2010 client IDE, which can help developers record frequently entered text, such as code, comments, copyright information, etc., although this feature is not first created by VS, it also enhances a lot of ease of use for the new version of VS. First, let's take a look at how to use it:

Start VS 2010 first, and the article installs VS 2010 flagship version of Beta 2:

Next, create a new file of any type in VS 2010, and here I create a HTML file:

Right-click where you want to insert the code and select Insert Snippet, or you can use the shortcut key Ctrl+K Ctrl+X to do the same:

Then select what you want to insert:

In this way, it is easy to insert the code, and you may not be able to see the efficiency of the above simple code. Next, let's add our commonly used code or the code commonly used in the project to it, which is very convenient and fast to use in the future, and this feature brings convenience to many kinds of people:

1. Lecturer: when you do Demo, you no longer have to copy and paste, as long as you make Demo code snippets into similar shortcut code, you can easily complete Demo

two。 Developer: by customizing shortcut code, we can easily share good algorithms and common data structures with colleagues. Let's first introduce how these predefined codes are stored. We select Tools in the VS 2010 menu item, and then select Code Snippets Manager:

In this manager we can see all the predefined code and text that can be quickly inserted:

Let's pick a random code and take a look at its physical location:

From the figure above, we can see that the code snippet is actually defined in a XML format file with the suffix snippet. Many people may have a headache when they see a large number of XML structures above, but it is actually very easy to make their own custom code snippets, so let's do a test example. Let's take the HTML code as an example. First of all, in order not to affect and distinguish from the code snippets that come with VS, we create a new node and select Add. Select a directory for the code snippet we want to store:

After the creation is completed, it is as follows:

When selecting a directory here, you can choose a shared directory. If you are an enterprise user, you can create a shared directory on the file server to facilitate the sharing of custom code snippets. Then we create a specific code snippet file, first create a new file in XML format:

Next, we use the custom code snippet function in the new file to create our own code snippet file, select Insert Snippet … Then select Snippet, why didn't we find this node in the HTML file before? Because the code snippet feature of VS 2010 has a certain intelligent judgment, it will judge the displayed code snippet according to our file type, so we can see the shortcut code of Snippet only in the XML format file. After the insertion is completed, it is as follows:

The most important one is the Code node. The Inner Text of the Code node is the code we inserted using this code snippet. Here, if we want to make the newly created code snippet available in the HTML document, we need to change the Language attribute to html, as follows:

After the modification is completed, save it to the MyCode directory with the suffix snippet:

The above is all the contents of the article "how to use the new features of VSTS 2010 client IDE". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report