Use Sourceinsight macros (quicker ....

Source: Internet
Author: User
Tags function prototype ticket
Marco is a powerful feature of Sourceinsight software that allows users to write macros for custom functions. Here is a more popular macro file Quicker.em, the original author seems to be the original Company's staff compiled, the basic functions of the overall, can meet the general needs, individuals can also be based on this as the basis for more personalized rewrite.





It seems to be unable to add attachments, there is a need to download Google keyword quicker.em.









with the following configuration:



1. Run Si, open the base project and add Quicker.em to the project;



2. Install the touch Heat key and menu, open the SI Options key Assignments menu, select Macro:autoexpand in the command window and assign a hotkey to it, such as Ctrl Enter.









Description of the features of the attached quicker.em:





1 Standard C language Extensions
1.1
This command automatically generates a C-language annotation that automatically wraps and aligns, especially when copying a long list of notes in a document, without having to justify it yourself. Also can automatically recognize Chinese and English words, for Chinese will not put a word apart, for English words will automatically add hyphens, below is an example of a comment Abcdefghijk = abcd + CDEFG + Hijk
1.2 {auto-generated}
1.3 while (WH) automatically generates a while statement
while (#)
{
#
}

1.4 If automatically generated if statement
If generate statement for if structure
IFE statements that generate if else structures
IFS corresponds to the F statement that generates an if ElseIf else structure
if (#)
{
#
}
1.5 for automatically generates a for statement that supports block command insertion
This command automatically generates the following format
for (#; #; #)
{
#
}
1.5.1 fo automatically generate a for statement it directly defines the loop variable compared to the previous command
UINT32 UlI = 0;

for (UlI = 0;  UlI < #; uli++)
{
#
}

1.6 Do automatic generation of Do while statements
This command automatically generates the following format
Do
{
#
} while (#);
1.7 #ifd automatically generated #ifdef commands
The command generates the following format
#ifdef UMSC
#endif
1.8 #ifn automatically generated #ifndef commands
The command generates the following format
#ifndef Umsc
#endif
1.9 #if automatically generated #if commands
The command generates the following format
#if (Umsc = = 1)
#endif
1.10 CPP automatically generates C-prototype description definitions for C + +
The command generates the following format
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif


#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

1.11 Switch (SW) automatically generates a switch statement
The command will prompt for the number of case, resulting in the following format
Switch (#)
{
Case #:
#
Break
Default
#
}

1.12 Case (CA) automatically generates case statements
Support for block command input
This command generates the following format to avoid missing break
Case #:
#
Break

1.13 struct (ST) auto-generated structure type
The command automatically generates the following structure definition, which prompts for the structure name, is automatically converted to uppercase, and is automatically appended with _stru as the struct type
typedef struct HELLO_TEST
{
#
}hello_test_stru;

1.14 enum (en) automatic generation of enum types
The command automatically generates the following structure definition, which prompts for the structure name, is automatically converted to uppercase, and is automatically appended with _stru as the struct type
typedef enum HELLO_TEST
{
#
}hello_test_enum;


2 Standard description Generation
2.1 Config (CO) configure user name and caption Description language
The user name is the previously generated author, the name of the modified person, the language

2.2 File (FI) generates a standard header
Automatically generate the following format, it can automatically get the file name, author name, time, and function list

2.3 Func (FU) generates a standard function header description
It automatically generates the following function header, which must be executed on the previous line of the function, which automatically obtains the function name, automatically obtains the input and output parameters of the function, and arranges the date and author. Be able to prompt input function description, the input content can be automatically wrapped alignment, so as to avoid missing the description, and generally in the detailed design of each function of the main functions are described in detail, as long as the description of these descriptions can be copied, it can automatically arrange, very convenient. (Because the macro function of SI is limited, the function of calling function and function is not automatically added)
Prompt for function name if not executed before existing function, prompt for function description, prompt for return value type, prompt for function entry parameter, press ESC to exit after output

2.4 Hi Add Revision History list
The change history list is automatically added to this line for history updates in the header and function header descriptions, which are added as follows

2.5 HD Auto Generate function header file
The command can automatically generate header file definitions for the top C files, including common macro definitions, as well as all function prototype definitions.

2.6 Hdn Generate a new file
The command can automatically generate the specified header file definition, including common macro definitions, prompting for the type of function prototype.

3 Code Modification comments
3.1 PN Add Problem ticket
In the case of the modification of the questionnaire required in the revised place to indicate the problem number and modification of the time, the majority of a problem list of changes will involve a few places, this function provides the function of automatically take the problem number, the following several commands generated by the problem ticket is to have it provided, if the input is # does not display the problem ticket
3.2 AP Add Issue sheet modification instructions
This command prompts you to enter a question number and reason for the change, and generates a description of the following format

3.3 AB Add start description
It can automatically generate the following instructions:
1. There is a problem number, where the problem number is added by the AP command.

2. No problem with the number of cases,


3.4 AE Add end command
The command is the corresponding command for AS, which indicates the end of the add
Support for block command operations

3.5 ABG Insert Add start and end description
This command is a combination of the first two commands
Support for block command operations

3.6 db Delete Start command
It can automatically generate the following instructions:
1. There is a problem number, where the problem number is added by the AP command.

2. No problem with the number of cases,


3.7 de Delete End command
This command is the corresponding command for the DS, indicating that the deletion is complete

3.8 dbg Insert Delete start and end description
This command is a combination of the first two commands
Support for block command operations

3.9 MB Modify Start command
It can automatically generate the following instructions:
1. There is a problem number, where the problem number is added by the AP command.

2. No problem with the number of cases,


3.10 Me Modify End command
This command is the corresponding command for MS, which means the end of deletion

3.11 MBG Insert Modify start and end instructions
This command is a combination of the first two commands
Support for block command operations

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.