I want to paste text which spans across multiple lines and is rectangular. For example, a rectangular box representing a device topology diagram.
+-------+
| |
| |
+-------+
When I paste this box, it should replace the existing characters and get pasted. I believe this is kind of replace mode. Not only first line, every line in my block should be pasted at the same column in every line (, that is, the block should be pasted as block itself, without pasting the second line of my block in start of the line.)
What I want is a mix of replace and visual block mode.
Before:
+------+
| |
| |
| |
+------+
After:
+------+. +-------+
| |
| |
| |
+------+
| |
| |
+------+
Expected:
+------+. +-----+
| | | |
| | | |
| | | |
+------+. +-----+
Second box is the one I pasting. I am familiar with visual block mode and can paste manually. But I want to paste this way, through a function or set of commands.
ctrl-v
instead ofv
), put my cursor on the last character of the first line of the first box and paste withp
, the second box is pasted next to the other one... Do you use visual-block to select the box?\y
in visual mode to copy a rectangular box, then\p
in normal mode to paste it by replacing a box of text with similar dimensions.