How can I delete a line without putting it into my default buffer?
Example:
line that will be copied.
line that I want to be substitued with the previous one.
What I’m trying to do:
yy
dd
p
But Vim replaces the recent copied string with the deleted (cutted) one. I know that I can use buffers like, "1yy
, dd
then "1p
, but I always forget to put the copied string in a buffer then I need to paste my contents first (line that will be copied) and then delete what I want (line that I want to be substituted with the previous one.)
How can I really delete a text in Vi(m) without copying it?
Another related question is how I can forward delete a word in insert mode? I want something similar to Ctrl+w.