Va snippet editor of vassistx

Source: Internet
Author: User

My function comments:

//###################################### ##########################

// File name: $ file_path $ \ $ file_base $. $ file_ext $

// Creation Time: $ year $/$ month $/$ day $ hour $: $ minute $

// By Sam

// Function: $ end $

// Function parameter: $ end $

// Function return value: $ end $

//###################################### ##########################

First, add the effect code first.

1 //************************************* *******************************
2 // comments to the testclass. h file
3 // file name: testclass. h
4 // file path: J: \ coding \ test \ c ++ uncertain \ cyuyan \
5 // By ripple
6 // Creation Time: 2009/10/3 11: 02
7 // file description:
8 //************************************* ********************************
9 # ifndef _ h_testclass_h _
10 # DEFINE _ h_testclass_h _
11
12 # include <iostream>
13 using namespace STD;
14
15 namespace ripple
16 {
17 //************************************* *******************************
18 // chello class Annotation
19 // Class Name: chello
20 // base class name: NULL
21 // namespace: ripple
22 // By ripple
23 // Creation Time: 2009/10/3
24 // class description: Hello
25 //************************************* ********************************
26
27 class chello
28 {
29 public:
30 void sayhello (void)
31 {
32 cout <"hello" <Endl;
33}
34 Private:
35
36 };
37
38 //************************************* *******************************
39 // chelloworld class Annotation
40 // Class Name: chelloworld
41 // base class name: chello
42 // namespace: ripple
43 // By ripple
44 // Creation Time: 2009/10/3 11: 16
45 // class description: helloworld
46 //************************************* ********************************
47
48 class chelloworld: Public chello
49 {
50 public:
51 void sayhello ()
52 {
53 cout <"Hello World" <Endl;
54}
55 private:
56
57 };
58
59}
60 # endif
61
Next, release the test code.

1 //************************************* *******************************
2 // C. cpp file comment
3 // file name: C. cpp
4 // file path: J: \ coding \ test \ c ++ uncertain \ cyuyan \
5 // By ripple
6 // Creation Time: 2009/10/3
7 // file description:
8 //************************************* ********************************
9
10 # include "testclass. H"
11 using namespace ripple;
12int main ()
13 {
14 chello P;
15 p. sayhello ();
16 chelloworld pp;
17 pp. sayhello ();
18 system ("pause ");
19}
Comments. They are written in vassistx in advance through macros. Next, we will release the code for each key macro.
First, file-level annotations
Fileinfo:
Set the shortcut key by yourself: (I use fileinfo as the shortcut key)
Don't worry about what these macros mean, and I will post all the macro explanations. I believe, that is, you can also compile macro code that fits your programming habits.

1 //************************************* *******************************
2 // $ file_base_upper $. $ file_ext_upper $ file Annotation
3 // file name: $ file_base_upper $. $ file_ext_upper $
4 // file path: $ file_path_upper $ \
5 // Author: % username %
6 // Creation Time: $ year $/$ month $/$ day $ hour $: $ minute $
7 // file Description: $ end $
8 //************************************* ********************************
9
Next, prevent the header file from being included (selected) multiple times (PS: this is the case, one is this, right-click and choose sourround with (va X ), select the name you set in advance,
Here I set it to prevent header files from being included multiple times (selected ).
Macro code:

1 # ifndef _ H _ $ file_base_upper $ _ H _
2 # DEFINE _ H _ $ file_base_upper $ _ H _
3
4 $ selected $
5
6 # endif
Note that the selected macro in the text indicates that the selected text will be surrounded by # ifndef... # endif
At last, the macro Writing of the next class comment is displayed.
Note: The VA snippet Editor supports both macros and system environment variables. Note that the following % username % is an example (indicating the current user name used by the system)

1 //************************************* *******************************
2 // $ classname $ class Annotation
3 // Class Name: $ classname $
4 // base class name: $ baseclassname $ null
5 // namespace: ripple
6 // Author: % username %
7 // Creation Time: $ year $/$ month $/$ day $ hour $: $ minute $
8 // class description: $ end $
9 //************************************* ********************************
10
11
Well, I have written a few commonly used macro code. You should feel a little bit about it.
The method for installing the software is not much said. There are many websites.
Next, how can I open the VA snippet editor?
There are several methods. The first one is my favorite method. In the text editing area of the IDE, enter //-and then the [edit] menu will pop up. Click this menu to go to the editing page. You can also add, delete, and copy operations.
In the IDE Main Menu, choose vassisstx-> visual sort x options-> advanced-> sugesstions, and click Edit va snippet on the right to go to the editing page.
Finally, we will present all the macros of vs snippet editor.

1 Date
2 $ date $ year/month/day formatted as % 04d/% 02d/% 02d
3 $ day of month formatted as % d
4 $ day_02 $ day of month formatted as % 02d
5 $ dayname $ three-character abbreviation of day
6 $ daylongname $ full name of day
7 $ month formatted as % d
8 $ month_02 $ month formatted as % 02d
9 $ monthname $ three-character abbreviation of month
10 $ monthlongname $ full name of month
11 $ year formatted as % d
12 $ year_02 $ year formatted as % 02d
13 time $ hour formatted as % d
14 $ hour_02 $ hour formatted as % 02d
15 $ minute formatted as % 02d
16 $ second formatted as % 02d
17 File
18 $ File $ full filename with path *
19 $ file_upper $ full filename with Path in uppercase *
20 $ file_base $ Filename without path or extension *
21 $ file_base_upper $ Filename without path or extension in upper case *
22 $ file_ext $ filename extension *
23 $ file_ext_upper $ filename extension in upper case *
24 $ file_path $ path of file *
25 $ file_path_upper $ path of file in upper case *
26 General
27 $ clipboard $ current clipboard
28 $ end $ position of caret after expansion
29 $ selected $ current selection **
30 $ literal' $ 'character
31 symbol Context
32 $ methodname $ name of containing Method
33 $ methodargs $ method parameters
34 $ classname $ name of containing Class
35 $ baseclassname $ name of base class of containing Class
36 $ namespacename $ name of Innermost containing namespace
37 guid
38 $ guid_definition $ generated guid formatted for use in a definition
39 $ guid_string $ generated guid formatted for use in a string
40 $ guid_struct $ generated guid formatted for use in a struct
41 refactor
42 $ generatedpropertyname $ property name generated during encapsulate Field
43 $ methodarg $ one parameter of the method and its type
44 $ methodargname $ one parameter of the Method
45 $ methodargtype $ type of one parameter of the Method
46 $ methodbody $ body of implementation
47 $ methodqualifier $ optional qualifiers of Method
48 $ parameterlist $ parameters separated by commas
49 $ symbolcontext $ context and name of Method
50 $ symbolname $ name of Method
51 $ symbolprivileges $ access of Method
52 $ symbolstatic $ keyword static or blank
53 $ symboltype $ return type of method
54 $ symbolvirtual $ keyword virtual or blank
55
56
For more information, see the official website http://www.wholetomato.com/products/features/vasnippets.asp ..
The last step is commonly used variables in the system environment (which may be useful ):

Windows System Variables
Allusersprofile = H: \ Documents ents and Settings \ All Users // The profile path of all users
Appdata = H: \ Documents ents and Settings \ Administrator \ Application Data // Application Path of the current user
Clusterlog = H: \ windows \ cluster. Log // cluster Log Path
Commonprogramfiles = H: \ Program Files \ common files // file path shared by the application
Computername = e2003 // computer name
Comspec = H: \ windows \ system32 \ cmd.exe // The current command interpreter
Homedrive = H: // current user's primary Disk
Homepath = \ Documents ents and Settings \ Administrator // main directory of the current user
Logonserver = \ e2003 // Login Server
Number_o_processors = 1 // processor Number of the current computer
OS = windows_nt // the kernel of the current system
Path = H: \ Program Files \ support tools \; H: \ windows \ system32; // anyone who has learned DoS knows
Pathext =. com ;. EXE ;. BAT ;. CMD ;. vbs ;. VBE ;. JS ;. JSE ;. WSF ;. wsh // In the past, the default options in DOS were com, EXE, and bat. Now there are so many. I don't know before. I can leave all scripts with no extension.
Processor_architecture = x86 // Processor Architecture
Processor_identifier = x86 family 15 Model 1 stepping 3, genuineintel // processor identifier
Processor_level = 15 // I have never noticed it. I don't know how to use it.
Processor_revision = 0103 // version?
ProgramFiles = H: \ Program Files // default installation directory of the application
Prompt = $ p $ g // anyone who has learned DoS knows
Sessionname = console // session name?
Systemdrive = H: // The drive letter of the system
Systemroot = H: \ WINDOWS // directory of the system
Temp = H: \ w.e ~ 1 \ admini ~ 1 \ locals ~ 1 \ Temp // temporary directory of the current user
TMP = H: \ docume ~ 1 \ admini ~ 1 \ locals ~ 1 \ Temp // same as above
Userdnsdomain = MCSE. com // DNS representation of the domain in which the current user is located
Userdomain = MCSE // NetBIOS Representation
Username = administrator // current user name
USERPROFILE = H: \ Documents ents and Settings \ Administrator // the current user's configuration file directory
WINDIR = H: \ WINDOWS // The directory where windows is located, always the same as systemroot

 

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.