One of the first things you will notice about vi is that
it likes to beep a lot and it tends to switch modes unexpectedly. vi
will produce an error beep every time you do something that is not an
option, such as paging past the end of the text buffer. There is nothing
particularly wrong with that, except that vi often does more than
just beep. As an example, if you try to move the cursor past the invisible
end-of-line characters using the arrow keys, vi will beep and then
switch to command mode. This wouldn't be that much of a problem if the
mode indicator in the lower right corner always worked correctly, but it
doesn't. Sometimes it works impeccably, but often it will say that it is
in one of the text entry modes when it is actually in command mode. The
danger here is that command mode, as mentioned before, interprets all
keystrokes as commands. So if you are unexpectedly thrown into command
mode and you keep typing, a series of powerful editing commands may destroy
the document you are working on. This possibility reinforces the importance
of backing up your documents frequently, so that you have the option of
quitting without saving the buffer to disk. If vi beeps at you when
you are in a text-entry mode, assume that you've been put into command mode,
and reselect the text-entry mode by pressing the appropriate character. At
worst, that character will be inserted into your document, where it can be
deleted later. The consequences of one keystroke while in command mode can
be far more destructive and time-consuming to undo.
Another quirk you may notice it that the up and down arrow keys do not work in text-entry mode; rather, they insert a line above where you are typing and put a capital letter on that line. You will need to exit text-entry mode, and delete the lines (with 'dd') to get rid of them, but otherwise you document will be unharmed.