Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was using nano before.

I'm a bit confused on how to start inserting text, sometimes I just start typing and on the bottom I see -- insert -- and I can edit and save fine. But sometimes I just skip around without being able to go in edit mode, what is going on?

share|improve this question
Hint: Install Vim and run vimtutor. – grawity May 9 '12 at 19:51
up vote 2 down vote accepted

To insert text into vi or vim, you need to enter Insert Mode. Do this by pressing i.

Alternatively, press a to append, for example. Press o to insert text below the current line.

Once you're done, press Esc to leave the insert mode again.

There are lots of vi/vim commands for simple text manipulation, maybe print out a cheatsheet and try to learn the most important ones.

share|improve this answer
nice! thanks :) – Sandro Dzneladze May 9 '12 at 19:58
This is a good reference later on. – Alex Hirzel May 9 '12 at 19:59

If you are in normal mode, pres the "i" key to go to insert mode. The escape key takes you back to normal mode.

share|improve this answer

vi and vim are completely different from nano. With nano, you are able to use keyboard shortcuts to save files, open new ones and access other "non-text editing" functionality. vi/vim are different because they are modal: there is an Insert mode (which you have reached by accident) and a Normal mode. Insert Mode is equivalent to the normal functionality of an editor like nano, and Normal mode is specifically dedicated to commands. For example, to save a file in vim you enter :w (for write) in Normal mode.

I would suggest looking up and reading a vim tutorial. After running through the basics, you can start to digest the breadth and depth of vim functionality by looking at tips and cheatsheets. Definitely learn the basics first, though!

share|improve this answer
I will, thanks! – Sandro Dzneladze May 9 '12 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .