delete without saving into the default register

4 Points

Mike Perrone Mike Perrone

4 years ago

Often I find myself with text in the default register that I want to paste somewhere, but only after I delete something new that's in the way. These allow me to quickly delete that new thing without losing what was in the default register (by putting it into the underscore register, which is a black hole, like /dev/null).

nnoremap <Leader>d "_d
nnoremap <Leader>D "_D
nnoremap <Leader>C "_C
nnoremap <Leader>c "_c
nnoremap <Leader>x "_x

Chris Penner

Chris Penner 4 years ago

Clever, this'll come in handy.

Kazark

Kazark 4 years ago

Hmm. I think I could like this. A lot.