Replace command batch comments: Use the following command to add comments to the beginning of a specified line: Starting line number, ending line number s/^/annotator/g uncomment: Starting line number, end line number s/^ annotator/g example: Add/comment: s # ^ # // # g in 2-8 rows delete // comment: 2, 8 s #...
Replacement Command
Batch comment:
Use the following command to add a comment at the beginning of the specified line:
: Start line number, end line number s/^/annotator/g
Uncomment:
: Start line number, end line number s/^ annotator/g
Example:
Add // comment in lines 2-8
: 2, 8 s # ^ # // # g
Delete from 2 to 8 rows // comment
: 2, 8 s # ^ // # g
Add # Comment in lines 10-20
: 10, 20 s/^/#/g
Delete in 10-20 rows # Comment
: 10, 20 s/^ # // g
Description
In this example, the regular delimiter # is used. if the separator matches //, # is used as the separator, and no escape is required for/, saving the number of inputs.
Author: open-source O & M Research Office"