1

I can enter visual-block mode using <C-v>, move down a couple of rows by pressing j several times, then paste some content from the registry via pressing p or P. However, the pasting will replace the column that has been selected.

Is there a way to just paste in front (as P does in normal mode) or after (as p does in normal mode) while still keep the column that has been selected?

3
  • 2
    ah, just realized I can in column mode press I to enter insert mode, then <C-$>" to paste from register.
    – athos
    Commented May 9 at 9:19
  • 3
    Feel free to post your own answer and accept it (you'll have to wait two days) such that the question doesn't stay open :-) Commented May 9 at 10:15
  • 2
    It's visual-block mode, not "column mode", and <C-$> is not a Vim command. To use a register in insert mode, you would use <C-r>.
    – romainl
    Commented May 9 at 10:40

1 Answer 1

2

To accomplish what you want, you can use I from visual-block mode to perform a "Visual-block Insert" (see :help v_b_I), or A to perform a "Visual-block Append" (see :help v_b_A). From there, you can paste from register x using <C-r>x (see :help <c-r>). Finish by exiting insert mode, and all the selected lines will change.

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