To insert a comment template into your code by using Visual Studio Extensions visual Assist X

Source: Internet
Author: User

Visual Assist is a plug-in developed by whole tomato for Microsoft Visual Studio. It enhances Visual Studio's smart Hints and code highlighting features, adds code hinting and refactoring, and adds spell checking to program annotations. It can also detect some basic syntax errors, such as using undeclared variables.

This plugin is used today primarily to enable quick insertion of comment templates. One is to improve the efficiency of coding, do not have to manually add a line of comments each time, the other is to standardize the code, because the template is inserted to ensure consistency of the annotations, improve code readability.

The installation environment of the plugin is as follows:

(1) Operating system: Windows 10

(2) Ide:visual Studio 2012

(3) Plugin version: Visual Assist X 2089

After installing the plugin, the VASSISTX menu option will appear in the VS menu bar, click "Insert va Snippet ..." and click "Edit va Snippets ..." in the pop-up options box to enter the Custom Template dialog box. As shown: (also according to: Vassiatx, Visual Assist Options ...) Open the Settings dialog, click "Suggestions" on the right side of the dialog box and select "Edit VA Snippets ..."

In this editor, users can define their own templates, VA also has some pre-defined templates, in the left box can be seen. Where Bold Bold is the title of the template, and the gray display is the shortcut input. When you write code in the process of entering the gray font part, you can think of the black bold corresponding template, press ENTER to insert into the code, greatly facilitates the code writing. For example, enter #in press ENTER to enter # include "" and so on.

When you need to define the template yourself, click New in the upper left corner and fill in the appropriate content on the right side of the dialog box. Where the title is for the user to see the theme of this new template, shortcut is to "see" The IDE, when you enter the shortcut in the IDE, you will associate the following template, press ENTER to insert, That is, shortcut is what you want to enter to tell the IDE that you want to insert the following template into your code. Description is also for users to see, user-friendly management templates.

Here is the function comment template I used, including the function name, author, date, input, output, last modified time and other information, the code is as follows:

/* ***************************************************************************** @function Name: $brief $* @author : xiongmao* @date: $YEAR $/$MONTH $/$DAY $ $HOUR $: $MINUTE $* @inparam: * @outparam: * @last change: ********************** *******************************************************/

Enter mark in the IDE and enter to insert a function note as shown

Visual Assist X provides a rich macro, in order to define the appropriate template, readers can go to the official website or search engine to query the meaning of VAX macros.

To insert a comment template into your code by using Visual Studio Extensions visual Assist X

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.