Now, I'm using Linux and VI editor. During I use VI I have some problem. When I use block copy into the text, that texts are overwrited on the original text.
How do I block copy into the original text not overwrite in VI?
If you've yanked a blockwise visual selection, pasting that will insert the block at the current position, into the existing text, without adding new lines or shifting existing text downwards. That's the expected behavior; you're effectively handling a square "cutout" of text, separate from the underlying text structure.
If you're handling complete line(s) (and based on your screenshot, you're doing just that), the correct approach is to select and yank the text linewise; i.e. use Shift + V instead of Ctrl + V for the selection (or [count]yy
in normal mode, which is faster if you know the number of lines).
If you really need to yank a square block, and paste this as new lines, there are the following approaches:
10o<Esc>`[
), then paste.:call setreg('', '', 'al')
glp
command that forces linewise pasting, regardless of how the text was yanked.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