Hardware Reference
In-Depth Information
The vim (improved vi) editor is a bit more complicated to use than nano. The vi
editor is designed to stay out of your way, and as such, you won't see any menus
or unnecessary information on the screen.
The vim editor has several different modes that you use to operate it. One of the
modes is insert mode. When you are in insert mode, you can use vi like you would
use the nano text editor, but here you simply type the text and use the arrow keys
to navigate the file. To get into insert mode, press the Insert key or type a capital I .
The vi text editor in insert mode
In order to save the file, we need to enter in the command mode. To do this, press
the Esc key followed by the : key. This will bring up a command prompt at the
bottom of the vim window.
The vi text editor in command mode
There are many different commands available in vim, as follows:
Command
Description
w
This writes the file to disk
q
This is used to quit vim
dd
This deletes the current line of text
x
This deletes the character where the cursor is
These commands can be entered in Command Prompt, or when you are navigating
the text and are not in insert mode.
An example of these commands is the wq command. This command saves and quits
vim when you press Enter . You won't be asked whether you want to save your
changes, as vim knows what you want, based on the command you give!
Search WWH ::




Custom Search