[Vimplugin] Code correction tag

Source: Internet
Author: User

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

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.