How do you add a string at the end of each line in vi?
Answer
To insert ” Hello world.” (space + clipboard) at the end of each of these lines:
Answer
To insert ” Hello world.” (space + clipboard) at the end of each of these lines:
- On a character in the first line, press Ctrl-V (or Ctrl-Q if Ctrl-V is paste).
- Press jj to extend the visual block over three lines.
- Press $ to extend the visual block to the end of each line. Press A then space then type Hello world.