How to delete (not cut) in Vim?

The black hole register "_ will do the trick, but there is a better solution:

When you enter the line back with the p command you are pasting the contents of the (volatile) default register "", which has been overwritten by dd. But you still can paste from the (non volatile) yank register "0, which won’t be overwritten by the delete command dd.

So these are the commands you want to use as per your example:

yy
dd
"0p

Leave a Comment

techhipbettruvabetnorabahisbahis forumueduseduedusedueduseduedusedusedusedu