Not easy to find a nice title for my problem.

I'm aware of inserting in front of a text-block:

Ctrl-v select lines I type text ESC

Now I would like to do this but also with replacing a part in my block selection. Currently I'm doing two operations

Ctrl-v select block x go back to start

Followed by the sequence I mentioned above.

Is there a way to combine these two operations by selecting (Ctrl-v) the block only once?

Here is a small example:

I would like to transform the following block

1  text
2  text
3  text
4  text
5  text


new text 
new text 
new text 
new text 
new text

doing only one "operation".

  • 1
    I'm not 100% sure what you want, maybe a real example would help (what you have vs. what you want). Are you aware of gv? It reselects the last visual selection and might be of help here. – PhilippFrank Mar 27 '15 at 9:02

Typing c after selecting your block instead of x will remove the text in the selection block and will enter insert mode. Once you type something and exit insert mode you should have the same change on every line.


Ctrl-v -- select block -- c -- insert whatever -- Esc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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