0

The vim binary shipped with the git for windows package has integration with OS clipboard enabled and I hate it. So many times I attempt to replace a word with something from the clipboard with cw + shiftinsert, only to be frustrated because the cw command ruined the clipboard by overwriting with the thing I wanted to replace.

So how do I disable this completely and forever, so that vim never ever interacts with the OS clipboard?

hlovdal
  • 203
  • 2
  • 5

1 Answers1

2

See the doc for :h 'clipboard' it is used to tell to vim to use different system clipboards or none of them. (The behavior is a bit different between vim and neovim).

In your case you want to use no clipboard so put that in your vimrc:

set clipboard=""

As Ben pointed out in the comments the "" is not necessary you can write only set clipboard=

statox
  • 49,782
  • 19
  • 148
  • 225
  • 1
    @D.BenKnoble you're right but I never got used to this syntax, having nothing after a = still makes me uncomfortable :) – statox Feb 23 '21 at 16:08