Table of Contents

The Vi Editor

The vi editor is a display-oriented text editor. It is used for creating text files. It is not used to create font formatting. It is not a mode-less editor (as common on modern PCs). Everything that you type does not necessarily appear on the screen. Vi has two modes, editing and command mode. Editing is used for data entry, while command is used to navigate and manipulate the data entered during the editing mode.

Basic navigation

command effect
h move left one space
j move down one space
k move up one space
l move right one space
w move forward to the beginning of the next word
e move forward to the end of the next word
b move back to the beginning of the previous word
$ go to the end of the line
^ go to the beginning of the line

Basic Editing

command effect
i insert at current location
a append after current space
x delete characters from the right of the current space
dd delete the current line

Search & Replace

command effect