thegleek wrote:What's the point of an introduction in the form of "Quick and Dirty vi Commands" that doesn't even tell you how to switch modes?bhtooefr wrote:I can barely even EXIT vi. It's REALLY unintuitive.
Quick and Dirty vi Commands
vi has two modes, a command mode and text entry mode. There are
more things it can do besides those two modes, but we will save that
for later. In command mode, you can use the letters 'j' and 'k' to move
up and down lines. The letters 'h' and 'l' move the cursor left and right.
when your change is complete, and you are back in command mode,
press ':wq' to save and exit. If you make a mistake, return to command
mode and press 'u'. It will undo one change. If you really screw things up
and don't want to save your changes so you can start over, press ':q!'
from command mode and it will force it to exit without saving.
also, hitting 'ZZ' while in command mode, will save and exit immediately.
**EDIT BY MOD: Thread split and locked from the "Text editor wars" thread. -Kevin**