0

to insert the same text inside several lines in one particular line <ctrl> + <v> to select the line and then <shift> + <i> to insert a texte BEFORE the particular column. Is there a way to do the same but insert a text AFTER the particular column, at the end of lines of same length instead of using 10,12s/$/pattern_to_be_inserted/gc?

2
  • 1
    do the same but with A, e.g. Ctrl-V jj$ then A and add some text...
    – Maxim Kim
    Commented Jan 30, 2022 at 15:16
  • Many thank @MaximKim!
    – ecjb
    Commented Jan 30, 2022 at 15:22

1 Answer 1

1
  1. Select visual block, press $A and add text -- it would be added to the ends of all lines in that visual block.

  2. Select visual block, press A and add text -- it would be added to the end of the block for each line.

enter image description here

2
  • Ok ... I have to wait 7 minutes to accept your answer. You were to quick! ;) Remind me if I forget
    – ecjb
    Commented Jan 30, 2022 at 15:23
  • @ecjb no problem, have fun!
    – Maxim Kim
    Commented Jan 30, 2022 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.