To quit, type :q
To quit without saving any changes, type :q! (colon q bang).
To write your changes to an file that you name when you save the file, type :w
filename, then press enter.
To return to command mode, type Esc
To navigate
use your right hand in its normal keyboard position,
index finder on j = move cursor down one line
middle finger on k = move cursor up one line
ring finger on l = move right one space
index finger on h = move left one space
0 (zero) moves the cursor to the zero position of the line, that is, the beginning.
$ moves the cursor to the end of the line (dollars are the end, or goal?)
Ctrl-f moves forward one screen
Ctrl-b moves backward one screen (think "b" for backward)
w moves forward one word
b moves backward one word
o opens a new line (moves you to the start of the next line to originate a new line)
dd deletes the current line
Create a file called NASA and on several of the lines put the string NASA.
Substitute the string Cosmonaut for that of NASA by typing the command
;1,33 s/NASA/Cosmonaut
This command substitutes the string "NASA" with that of "Cosmonaut"
for lines 1 through 33 of the current file.
_______________
copyleft 1999 Thomas Albert