e.g.
1.1.1.1 a.com
2.1.1.1 b.com
1.3.1.1 c.com
1.1.5.1 d.com
1.2.1.1 e.com
now I want to replace this ip from another text, not the same width, like 111.222.111.222, is also store in a rect text.
I know that Ctrl+v can do rect select, but how to do copy and paste?
Ctrl-V, as you said, to select, then 'y' to "yank" (copy). You can then paste it with 'p'. You can select an area in which to paste by again using Ctrl-V and hitting 'p' instead of just hitting 'p'. Vim will respect the rectangular area that you copied when you do the pasting, so you won't need to reformat.
In visual block mode (ctrl+v), highlight an area of your choice with the motion keys and then press "y" to copy the area, "p" to paste it (starting at the location of the cursor), or you can also press "x" to delete an highlighted area.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With