When correcting the code, it is generally necessary to mark the amended part, that is, fix tag.
What's the use of fixing tags? Because there is a fixed format, it can also be used to count the number of lines of change code. Of course, the number of lines of statistical code is not simply inserted into a snippet.
Mark correction Section
number of statistics code lines
Instructions for use
- \ta: Inserts an append code area at the line where the cursor is located.
- \TC: Change the selected area.
- \TD: Removes the selected area.
- \TM: Counts the number of lines of code for the selected area.
- \TU: Update the number of lines in the current file for each additional code region, change code region, and delete code area. Updates are only for areas where the keyword matches the setting.
- \TT: Generates bash commands and VI scripts for extracting all the change areas.
- \ts: After running the bash command generated by \TT, a result file is generated, and the result file is opened with this command to make a statistical summation of all the file's change codes.
- \to: Agree to the change code for the selected area. Select the entire file and use this command to remove the fix tag.
- \tn: Rejects the change code for the selected area. Select the entire file and use this command to revert to the original code.
Setting instructions
Project key word S:tag_key1,s:tag_key2,s:tag_key3
S:tag_key2 and S:tag_key3 can be set to an empty string if the keyword is less than 3
Fix cause S:tag_allowr,s:tag_reason
If S:TAG_ALLOWR is set to 1, the user is asked to enter the reason for remediation, the default value for the remediation reason is s:tag_reason, and the reason for the correction appears in the next line of the keyword
Compilation Options S:tag_mode,s:tag_co
If S:tag_mode is set to 1, the Append section will also be wrapped in # if ... #endif之间.
S:tag_co is not empty, and s:tag_mode is 1 o'clock, # if # 0 and # if 1 are not used, but #ifdef S:tag_co and #ifndef S:tag_co are used
Name S:tag_user
Date format S:TAG_TIMEF
Delimited symbol S:tag_sep
Characters around the keyword
Fixed tag start/end indicator S:tag_start,s:tag_end
Comment Start/end indicator S:cmt_start,s:cmt_end
If you want to use//form of comments, you can set the S:cmt_start//, the S:cmt_end set to empty
Plug-in code Modifytag.vim.
[Vimplugin] Code correction tag