Prevent single letter deletes to spam clipboard manager

33 views Asked by At

With unnamed clipboard option included, single letter deletes spam my clipboard manager Is it possible to fix this so that single letter deletes (with x) are not yanked to clipboard.

1

There are 1 answers

0
Ingo Karkat On BEST ANSWER

You can redefine the x command, either to delete to the default register:

:nnoremap x ""x

or to the black-hole:

:nnoremap x "_x

With :help map-expr, you could extend this to redirect the register only if no [count] is given (by evaluating v:count), or if no custom register is specified (v:register).