1

I am essentially trying to achieve the task asked about in this thread. The answers do not work when using visual selection.

How would you delete a visual selection in Vim without putting text in the register?

Community
  • 1
  • 1
Dru
  • 9,632
  • 13
  • 49
  • 68

2 Answers2

1

Simply select the text then press "_d.

Smylers
  • 1,673
  • 14
  • 18
1

If "_d does not work (but replaces the selection with the characters), then you're in select mode, not visual mode. You need to prepend <C-g> to switch modes first: <C-g>"_d.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • Thanks @Ingo. That was the key. I was trying to go into visual mode after declaring the register. – Dru Jan 08 '13 at 12:11