In Vim it is possible to insert text in multiple lines at once with the I
command, like in an answer Stack Overflow question How do I insert text at beginning of a multi-line selection in vi/Vim?. However, this only works for real inserting. If I want to remove some characters at the same time this doesn't work.
For example, I want to change
000 one
000 two
000 three
000 four
to
111 one
111 two
111 three
000 four
I would do this by calling ^V3ggllx
to remove the 000 from the first three lines and then ^V3ggI111^[
to insert the 111 at the same positions, which seems quite awkward to me.
(The above means, going to visual blockwise mode, marking all the zeros in the first three lines and removing them. Then go to visual blockwise mode again, marking the start of the first three lines, going to insert mode for multiple lines, inserting the 111 and exiting with Esc.)
There must be a better way to do this. The most annoying thing is that I have to select the region again after removing the zeros. If the region was still selected after the removal it would be fine. Also if would be possible in multiple insert mode to remove characters, it would be fine too. But if I try this, only the first line is changed.