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,254
  • 13
  • 45
  • 68

2 Answers2

1

Simply select the text then press "_d.

Smylers
  • 1,635
  • 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
  • 161,022
  • 15
  • 231
  • 302
  • 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