Manual Pages for the vi Editor man vi
2/25/01

If you know what this is, it can be a handy little memory jogger. If you don't, it will remain a mystery forever.

I keep adding stuff to it.

Pay attention to caps.


Basics

To get in:
vi filename <enter>

To get out without saving changes:
<esc> :q! <enter>

To get out and save changes:
<esc> ZZ <enter>


Mode Shifting

Enter Command Mode:
<esc>

Enter Insert Mode:
i


Moving Around (Command Mode)

Move Down:
j

Move Up:
k

Move Left:
h

Move Right:
l


Searching (Command Mode)

Search Forward:
/ text <enter>

Search Forward Again:
/ <enter>

Search Backwards:
? text <enter>

Search Backwards Again:
? <enter>


--end--