How do you record a macro that duplicates a line and modifies the copy?
Answer
qayyp:s/old/new/\nq
Explanation
Record a macro that yanks and pastes the current line, then substitutes text on the new line. Useful for generating variants.
qayyp:s/old/new/\nq
Record a macro that yanks and pastes the current line, then substitutes text on the new line. Useful for generating variants.