I got used to indent my code in such way:
asd sthng
asd someText sthng
I would like to paste something in the space in the first line. I would like to keep indention also.
Result of pasting:
asd pstdText sthng
asd someText sthng
Is there a way in VIM to paste a text in a way how replace mode (R
) works?
You can enter replace mode with R
and then insert the contents of the register via <C-R>"
.
Alternatively, if you select the amount of text that corresponds to the to-be-pasted text (or there's a motion that covers such), you can use my UnconditionalPaste plugin to replace the selection with the register (without losing the register contents).
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