7.A.1: Moving in vi | 7: Editing Files | 7: Editing Files |
In its time, the vi editor was revolutionary because it was so visual. It is a full-screen editor, but is only one step up (in user-friendliness) from a line editor (which is some steps down below modern word processors). While vi is fairly primitive in the way you give it commands, it is also robust, fast, reliable and available on every Unix system (which you will give thanks for when your windowing system is down).
Even if you prefer to use some other editor as your workhorse, it's a good idea to learn some basic vi commands for backup purposes.
The vi editor has two basic modes:
command mode: | to issue commands to save, move, delete, etc. |
insert mode: | to add text |
By default, the vi editor is in command mode and returns to it after successful insertion of text.
Press the i key: | enter insert mode |
Press the [Esc] key: | exit insert mode |
As is true for most of Unix, vi is case sensitive. So while U and u are related, they are not the same.
Now that you understand some basic concepts of vi, let's start it up and try out some commands:
7.A.1: Moving in vi | 7: Editing Files | 7: Editing Files |