Deleting portion of text with Vim

With Vim, I’m used to deleting portions of text using this command: 10D (to delete 10 lines). But I wanted to delete portions without my counting the number of lines first. I want this ease for replying to emails, whereby I cut all unwanted quoted text down the line but reserving my sig.

I now know that to do that:

  1. Put the cursor in the first character of the region to be deleted.
  2. Enter Visual mode by pressing ‘v’.
  3. Move the cursor down to the last character of he region to be deleted.
  4. Press <Del> or d.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s