huacnlee
huacnlee

Reputation: 460

Vim will copy the text when I delete it, but how can I disable it?

I don't like automatic copy the deleted text when delete in Vim, how to disable it?

Upvotes: 4

Views: 599

Answers (2)

Iaian
Iaian

Reputation: 21

I also wanted to disable this and have found a solution:

Add this to your .gvimrc file and autocopy text on select will be disabled.

  " Following three lines remove the auto copy function from VIM
  set guioptions-=a
  set guioptions-=A
  set guioptions-=aA

Upvotes: 1

K. Norbert
K. Norbert

Reputation: 10684

Not sure there is a way to disable it, but there is a black hole register called '_', which swallows everything, and gives nothing back.

You use it by prepending "_ to the command, so "_dd would send the current line to the blackhole.

Upvotes: 9

Related Questions