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

01.01.2013 Views

VI ( 1) vi file vi vi + n file vi + file vi -r vi -r file vi filel, file2, vi -t tag vi +/pat file VI (l) Edit at first line of file Edit a new empty file Edit at n line in file Edit at last line in file List saved files Recover file and edit saved file Edit filel; file2; .. . (after editing filel enter :n for each remaining file) Edit at tag file in tags file Search for and edit at pattern in file view file Read only view of file LEAVING VI EDITOR :q Quit vi when no changes have occurred since last write :q! :wq zz POSITIONING THE File Positioning fntF fntB fntD fntU fntE fntY fn}G fn}lpat fn}?pat fn}n fn/N (n}lpatl+m fn}?pat?-m Screen Positioning fn}H fn}L M Line Positioning 0 Quit vi, do not save changes since last write Write and quit (exit vi, saving changes) Write and quit (exit vi, saving changes) CURSOR Forward (nj full screens Backward screens Scroll down (default is half screen) Scroll up (default is half screen) Scroll down 1 line Scroll up 1 line Go to line n (default is last line of file) Go to next line matching pat Previous line matching pat Repeat last I or ? Reverse last I or ? m th line after pat m th line before pat To nth line from top of display. Without n, to top To nth line from bottom of display. Without n, to bottom To middle line of display Beginning of line - 2 -

VI (l) fnj$ End of line fn}+ Next line, at first non-white [nj- Previous line, at first non-white fn} Return, same as + � fn/! 1 or j Next line, same column [n}ll or k Previous line, same column Character Positioning Within a Line [n}l First non-white [njh or -+ fnjl or + fn}spacebar fnjbackspace [ntH [njfz fn}Fz fnjtz fn}Tz fnj; fnj, fn/1 Word Positioning fnjw [njb [nje fn}W fn}B fn}E Sentence, [nj ) [nj( fnj } fnj { Forward one character Backward one character Same as -+ Backwards one character Same as +- or backspace Find z forward Find z backward Move up to z forward Move up to z backward Repeat last f, F, t, or T Inverse of ; Move to specified column number n VI ( 1) Move forward to beginning of word. Punctuation and strings of punctuation count as words. Move back to beginning of word. Punctuation and strings of punctuation count as words. Move forward to end of word. Punctuation and strings of punctuation count as words. Move forward to beginning of word. Punctuation ignored. Move back to beginning of word. Punctuation ignored. Move forward to end of word. Punctuation ignored. Paragraph, Heading Positioning Forward to next sentence Back a sentence Forward to next paragraph Back a paragraph - 3-

VI (l)<br />

fnj$ End of line<br />

fn}+ Next line, at first non-white<br />

[nj- Previous line, at first non-white<br />

fn} Return, same as +<br />

� fn/! 1 or j Next line, same column<br />

[n}ll or k Previous line, same column<br />

Character Positioning Within a Line<br />

[n}l First non-white<br />

[njh or -+<br />

fnjl or +<br />

fn}spacebar<br />

fnjbackspace<br />

[ntH<br />

[njfz<br />

fn}Fz<br />

fnjtz<br />

fn}Tz<br />

fnj;<br />

fnj,<br />

fn/1<br />

Word Positioning<br />

fnjw<br />

[njb<br />

[nje<br />

fn}W<br />

fn}B<br />

fn}E<br />

Sentence,<br />

[nj )<br />

[nj(<br />

fnj }<br />

fnj {<br />

Forward one character<br />

Backward one character<br />

Same as -+<br />

Backwards one character<br />

Same as +- or backspace<br />

Find z forward<br />

Find z backward<br />

Move up to z forward<br />

Move up to z backward<br />

Repeat last f, F, t, or T<br />

Inverse of ;<br />

Move to specified column number n<br />

VI ( 1)<br />

Move forward to beginning of word. Punctuation<br />

and strings of punctuation count as<br />

words.<br />

Move back to beginning of word. Punctuation<br />

and strings of punctuation count as<br />

words.<br />

Move forward to end of word. Punctuation<br />

and strings of punctuation count as words.<br />

Move forward to beginning of word. Punctuation<br />

ignored.<br />

Move back to beginning of word. Punctuation<br />

ignored.<br />

Move forward to end of word. Punctuation<br />

ignored.<br />

Paragraph, Heading Positioning<br />

Forward to next sentence<br />

Back a sentence<br />

Forward to next paragraph<br />

Back a paragraph<br />

- 3-

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

Saved successfully!

Ooh no, something went wrong!