How to set default registers in vim?

216 Views Asked by At

I want to set the default register of d, x, and c to the black hole and use some mapping for use other register, like <leader>d "*d

Of course I can remap like

noremap d "_d

but then I'd have to remap dd to "_dd and when I select something and press d vim waits a second because it could be dd, or just d. Other thing I could do is: noremap _ "_ but I dont want to tell vim that I want to use the black hole register each time I want to really delete something.

1

There are 1 best solutions below

0
romainl On BEST ANSWER

That behaviour is hardcoded and you can't do anything to change it except creating lots of brittle mappings.

You will be better off embracing the versatility of register rather than fighting it.