This is our VI editor tutorial.
VI stands for visual editor. VI is a text editor used in Unix operating systems. There are many other types of text editors such as EMACS, PICO, and ED; but this tutorial will only focus on VI because it is widely available on Unix and Linux systems.
![]()
In VI, there are two modes: insert and command. In the insert mode, you can insert (type) data into a document. In the command mode, you can use the various tools like Microsoft Word's toolbars. VI is a powerful editor because it has a lot of commands. It is also more efficient because the fingers do not need to leave the keyboard. For example, the mouse is useless when using VI. To navigate your way inside a document, you can either use the arrow keys or the h, j, k, l keys. Below is a Java applet that you can use to simulate cursor movements in a vi editor environment. For those that are interested or just nosy :), the java source code can be found
here.
To start the applet, click on the black screen first and make sure the CAPS LOCK key is off. h is to move left. j is to move down. k is to move up. l is to move right. When in command mode, you can also move one word forward (w) or one word backward (b). In Microsoft Word, you have to press the CTRL key and the right or left arrow. To move to the end of a document, you press SHIFT + G. In Word, you must press CTRL + END. By always keeping your fingers on the home-key position of the keyboard, precious time is saved.
To start entering data, you must switch to the insert mode. This can be done in various ways:
To switch to command mode, you hit the ESC key. When in doubt which mode you are in, hit the ESC key. To save a document, you must be in command mode. You save by typing :w and the document will be saved. If you did not initially name your file, you can type :w resume.txt to save your document as resume.txt. VI is not user friendly because there are no toolbars to use. Hence, it takes a lot of practice to use it efficiently. The more you use it, the more commands you will remember. Below are some more useful commands.
We hope our little tutorial was helpful to you. Thanks for stopping by. ***Have you ever wondered why VI's cursor is directly on top of a character while Microsoft Word's cursor is between characters? If you know the reason, please email us***. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |