UNIX VI Editor Commands
UNIX VI Editor Commands
UNIX VI Editor Commands
[ESC] Exit any mode wb Move forward or backward by word ia Insert before or after curson position
Return file to state at last save e Move to end of word IA Insert at start or end of line
:e!
[undo all]
nG Goto to line n Open new line above or below
oO
current line
G Goto to last line in file
r Replace character
Opening Files Move to the beginning of the
)(
previous or next sentence cw Change word
vi filename Open filename
Move to top (highest,) middle or last cc Change current line
HML
vi filename1 filename2 Open specified filenames line of screen
R Overwrite
Open filename in read- Goto first nonblank character of
view filename ^ x Delete character above cursor???
only mode current line
vi + filename Open filename at last line Goto first nonblank character of dw Delete word
+-
previous or next line
vi -r List recoverable files dd Delete current line
[CTRL] F Move forward one screen
vi -r filename Recover filename
[CTRL] B Move backward one screen D Delete to end of line
/string Search forward for string z [RETURN] Put current line at top of screen
?string Search backward for string z. Put current line at middle of screen
Closing (Quiting) & Saving Files
Repeat last search forward or z- Put current line at bottom of screen
nN
backward ZZ Save and close file
yy Copy line