vim tricks – different types of insert, repeat

To repeat your last operation type ‘.’ in command mode.

Here are some different ways to insert

A – append text to end of line
I – insert text at beginning of line
o – open blank line below cursor
O – open blank line above cursur
s – delete char at cursor and sub text
S – Delete line and sub text
R – overstrike existing chars with new chars

To think, I’ve survived with only i, a, r, and I think I’ve used R before to this day.

One thing that’s interesting.  I wonder how many people think they know how to use their text editor and don’t.  I know I thought I knew vim pretty good until I started to learn how to use it.

I should mention

These can be preceded with numbers. For example,

5i*- [esc] will insert
*-*-*-*-*-

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