Simple Tips to Allow Anyone to Use vi for Simple Editing – the 95/5 Rule

I remember trying to use vi, again, six months ago. I started typing, and the app exploded once again.

While configuring my Ubuntu server today, I have no choice but to use vi (I usually fallback on TextMate’s mate on my Mac). Just using the following, I was able to do everything I needed to do without leveraging vi’s other strengths:

  1. Bring up vi for your file (e.g., vi file_I_want_to_edit).
  2. Realize that you are in ‘command mode’; thus, do not try to edit your file, yet.
  3. Position the cursor to where you want to do some editing.
  4. Hit ‘i’ to edit before the cursor, or ‘a’ to edit after it. You should see “—INSERT—” on the bottom left of the screen.
  5. Edit away. Add new text, delete, or paste in things until finished – be creative! ;)
  6. Hit the ESC key, which moves you back into ‘command mode’ (“—INSERT—” is now gone).
  7. To save the file, hold the shift key down and hit ‘z’ twice.

While I did not take advantage of vi, I was able to do the basic editing I needed to do. Enjoy!


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s