Vim Tip of the Day: Writing Things

In most editors, writing things is as simple as pressing the corresponding keys on your keyboard. But in Vim, pressing keys could at first have wild and surprising results. We’ll learn all about why, but for now, try these to get back to familiar territory:

i / I — insert before cursor / before beginning of line
a / A — insert or “append” after cursor / after end of line
o / O — open new line below / above (obeys formatting and indenting)

You start Vim in “Normal” mode, and each of these puts you in “Insert” mode where you can then write things down as usual. Escape always brings you back to Normal mode.

The more you use Vim, the more you’ll feel “safe” returning to Normal mode, since you’ll discover that Normal mode understands the text you are working with in the same way that you do. Normal mode gets you. It doesn’t make it easy for you to quit, but that’s because it cares.

5 comments

  1. Boris Kuete

    Thanks for the bite size tutorial. Through your minimalist tuto and well thought title, you are really capturing Vim essential ideas. This blog is inspiring. I will stay tuned to the future tips

  2. Olaf 'Rhialto' Seibert

    Instead of “input mode”, I always like to think of a multi-character input command starting with any of these letters, followed by the text you want to input, and ending with ESC. No modes needed!

Leave a Reply

Your email address will not be published. Required fields are marked *