How to Use Vim

Follow these steps to use the Vim (Vi IMproved) text editor.

Watch the video tutorial here!

1. Log on to the Grid.

2. Use vim to modify one of your files. In this example, the user is editing the text file Grid_User. Type vim filename then press Enter.

Image

You will now see the text of the original file.

Image

3. To insert text, press the I key. You will notice the words INSERT near the bottom. Move the cursor where you want to input text by using the arrow keys and then type. In this example, one sentence was added beneath the previous text.

Image

4. To exit saving your changes, press the Esc key — this takes you out of Insert mode. Now, press the colon key, and then type wq (:wq). This stands for write and quit, meaning you want to save and quit. Press enter. If you want to just save, you can type :w and if you want to quit without saving changes, you can type :q! .

Image

5. You have now edited a file and saved it.