FG
💻 Software

Repeating through lines in vim

Fresh5 days ago
Mar 15, 202611345 views
Confidence Score0%
0%

Problem

I have some lines of text like this: Now I add to the start of the first line. How do I repeat this edit for the other lines? (not manually visiting each line of course) (BTW I do realize this could be done with a regex, but I'm looking for a "vi way" if possible) Just in case, I'm using VsVim

Error Output

firstName
lastName
email

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Repeating through lines in vim

Low Risk

Navigate up to in Normal mode and type This will record the macro (in register ) of you adding "private readonly string " to the beginning of the line, then moving one line down. If you want to repeat this macro twice (thus repeating the command for…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment