01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VI ( 1)<br />

vi file<br />

vi<br />

vi + n file<br />

vi + file<br />

vi -r<br />

vi -r file<br />

vi filel, file2,<br />

vi -t tag<br />

vi +/pat file<br />

VI (l)<br />

Edit at first line of file<br />

Edit a new empty file<br />

Edit at n line in file<br />

Edit at last line in file<br />

List saved files<br />

Recover file and edit saved file<br />

Edit filel; file2; .. . (after editing filel enter<br />

:n for each remaining file)<br />

Edit at tag file in tags file<br />

Search for and edit at pattern in file<br />

view file Read only view of file<br />

LEAVING VI EDITOR<br />

:q Quit vi when no changes have occurred since<br />

last write<br />

:q!<br />

:wq <br />

zz<br />

POSITIONING THE<br />

File Positioning<br />

fntF<br />

fntB<br />

fntD<br />

fntU<br />

fntE<br />

fntY<br />

fn}G<br />

fn}lpat<br />

fn}?pat<br />

fn}n<br />

fn/N<br />

(n}lpatl+m<br />

fn}?pat?-m<br />

Screen Positioning<br />

fn}H<br />

fn}L<br />

M<br />

Line Positioning<br />

0<br />

Quit vi, do not save changes since last write<br />

Write and quit (exit vi, saving changes)<br />

Write and quit (exit vi, saving changes)<br />

CURSOR<br />

Forward (nj full screens<br />

Backward screens<br />

Scroll down (default is half screen)<br />

Scroll up (default is half screen)<br />

Scroll down 1 line<br />

Scroll up 1 line<br />

Go to line n (default is last line of file)<br />

Go to next line matching pat<br />

Previous line matching pat<br />

Repeat last I or ?<br />

Reverse last I or ?<br />

m th line after pat<br />

m th line before pat<br />

To nth line from top of display. Without n,<br />

to top<br />

To nth line from bottom of display. Without<br />

n, to bottom<br />

To middle line of display<br />

Beginning of line<br />

- 2 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!