View Single Post
Posts: 28 | Thanked: 10 times | Joined on May 2007
#5
There are many right answers to questions like "how do I delete?"

No matter how lazy you are, in fact especially if you're lazy, you should look at a diagram of vi's "modes." You can see a good example at

http://www.ostc.de/vi-overview-eng.pdf

That is a six-slides-on-one-pdf-page intro to vi I just now found by googling vi modes. The second of the six slides is a diagram of vi's modes. I found plenty such diagrams by googling, but this was the best-looking. The other diagrams on that page are also really good.

The most confusing thing about vi for newbs is that it behaves differently depending on which mode it's in. You have to be able to go from one mode to another to be sure that any hint will work (or just say, "well, I *assumed* you'd be in edit mode!" and roll your eyes).

Most of the hints given in this thread assume you're in "command mode" in the above-mentioned diagram. Looking at the diagram, you can probably see that pressing the escape key puts you in this mode or does nothing if you're already in this mode. So if the hints behave unexpectedly, you may want to hit the escape key (the back button on my N800) first.
 

The Following User Says Thank You to zorg For This Useful Post: