2 ms·
Also worth remembering is that every command that deletes really cuts. Which is to say, deletion commands like x and dd store the deleted content in the registe
by shadowfiend 15y ago
Also worth remembering is that every command that deletes really cuts. Which is to say, deletion commands like x and dd store the deleted content in the register that will be used when you hit p or P. This is important to know both because it can be very useful sometimes and because it can get in your way other times (e.g., if you're trying to repeat an action and keep replacing a line with another line, you'll have to paste before you delete so you don't override your register).
- graywh 15y agoOr you can specify the register name. Don't limit yourself to the unnamed register.
- shadowfiend 15y agoAbsolutely. My fault for not mentioning it :)
- johncoltrane 15y agovnoremap <leader>p "_dP "_ is the blackhole register, with this the replaced text disappears and you can continue "putting" the new text at will.