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
VI ( 1 ) VI( 1) file to newtext :gftextfs/ fnewtextfp Change first appearance of text in each line in file to newtext and print each changed line :g/ text/sf/ newtextf c List one at a time each line with text and change as required to newtext using a y :(mj,(njgf text/ sf/ newtext Change first appearance of text in each line in file to newtext :(mj,(njgf text/ sf/ newtextf p Change first appearance of text in lines from m to n to newtext and print each changed line :(mj,(njgf text/sf/ newtextf c List one at a time each line with text from m to n and change as required to newtext using ay MANIPULATING FILES Copy From Another File :r file Copy file into buffer after current line :(njr file< CR> Copy file to buffer after nth line Copy To Another File Note: Follow entry with . :w file :w! file :w>>file :(mj,(njw file :(mj,(njw ! file :(mj,(njw > >file Edit Current File :w :w file "e! :f AG :ta. tag A] Edit Other Files :e file Write the current file to file Overwrite existing file with file Add current file to end of file Write lines m through n to file Overwrite existing file with file containing lines m through n Add lines m through n to end of file Write changes to current file Write file to current unnamed file Reedit current file, discarding changes since last write Show current file and line Synonym for :f To tag file entry tag :ta., following word is tag From Current File Edit file when write has occurred in current file, return to shell after edit, changes not lost in current file - 6 -
VI (l) :e! file :e + name :e + n :n :n args :e # 'f VI (l) Edit file when no write has occurred in current file, return to shell after edit, changes list in current file Edit starting at end Edit starting at line n Edit next file in list when vi was called with more than one file Specify new list of files to be edited Edit alternate file when two files are being edited Synonym for :e # . ESCAPING TO THE SHELL :sh Start a separate shell (to run several commands), return with 'D :!command Run one shell command, then return to current buffer MARKING AND RETURNING Previous context mx 'x 'x o o • at first non-white in line Mark position with letter x to mark x 0 0 0 at first non-white in line MISCELLANEOUS OPERATIONS Repeat the last append, insert, open, delete, change, or put command Switch character from lowercase to uppercase and vice versa '? Delete or rubout interrupts i Split a line before the cursor a. Split a line after the cursor 'L Reprint screen if '? scrambles it J Join lines :nu Line number cursor is on xp Switch characters SETTING OPTIONS Initializing Options :set x :set nox :set x=val :set :set a.ll Enable option x Disable option x Assign a value to x option Show changed options Show all options - 7-
- Page 573 and 574: TEST ( 1 ) TEST (I) NAME test - con
- Page 575 and 576: TIME ( 1) TIME ( 1) NAME time - tim
- Page 577: TOUCH (!) TOUCH (!) NAME touch - up
- Page 581 and 582: TRUE ( ! ) NAME true, false - provi
- Page 583 and 584: TSET ( 1) {AT&T UNIX PC only ) TSET
- Page 585: TSORT ( l ) TSORT ( 1) NAME tsort -
- Page 588 and 589: � I I I I I I I II I I I I I I I
- Page 590 and 591: UAHELP (l) \US\ \BL\ \BS\ \EOT\ (AT
- Page 592 and 593: !�
- Page 595 and 596: UMODEM(l) UMODEM (l) NAME umodem -
- Page 597 and 598: UNAME(l) UNAME(l) NAME uname - prin
- Page 599: UNGET ( l ) UNGET ( l ) NAME unget
- Page 602 and 603: � \.,_ .:1 :� \__. ·
- Page 605 and 606: UUCP {IC) UUCP {IC) NAME uucp, uulo
- Page 607 and 608: UUSTAT (IC) UUSTAT ( IC ) NAME uust
- Page 609 and 610: UUTO (lC} UUTO (lC} NAME uuto, uupi
- Page 611 and 612: UUX ( lC ) UUX ( lC ) NAME uux - UN
- Page 613 and 614: VAL(l) VAL(I) NAME val - validate s
- Page 615 and 616: VC (l) VC (l) NAME vc - version con
- Page 617: VC (l) VC ( l ) ::text Used for key
- Page 620 and 621: VI ( 1) vi file vi vi + n file vi +
- Page 622 and 623: VI (l) rn OAD Av MODIFYING TEXT Cha
- Page 626 and 627: VI (l) VI (l) :set x? Show value of
- Page 628 and 629: VI (l) VI ( 1) mapped to I, then if
- Page 630 and 631: VI (l) VI (l) won't be broken. Inse
- Page 632 and 633: � I . .... .,_ J _ . . ·
- Page 634 and 635: .. \ '-�� -·
- Page 637 and 638: WIIO (I) WHO(l) NAME who - who is o
- Page 639: WRITE ( l ) WRITE ( l ) NAME write
- Page 642 and 643: XARGS(l) XARGS (l) -nnumber Execute
- Page 645 and 646: YACC { I ) YACC { l ) NAME yacc - y
- Page 647 and 648: INTRO ( 2) INTR0 ( 2 ) NAME intro -
- Page 649 and 650: INTRO ( 2) INTR0 (2) 21 EISDffi Is
- Page 651 and 652: INTRO (2) INTRO ( 2) ProcO is the s
- Page 653 and 654: INTR0 (2) INTR0 (2) permission requ
- Page 655 and 656: INTR0 (2) time_t shm_dtime; time_t
- Page 657: ACCESS (2} ACCESS (2} NAME access -
- Page 661 and 662: ALARM (2) ALARM (2) NAME alarm - se
- Page 663: BRK(2) BRK ( 2 ) NAME brk, sbrk - c
- Page 667 and 668: CHMOD (2) CHMOD (2) NAME chmod - ch
- Page 669: CHOWN(2) CHOWN(2) NAME chown - chan
- Page 673 and 674: CLOSE ( 2) CLOSE (2) NAME close - c
VI (l)<br />
:e! file<br />
:e + name<br />
:e + n<br />
:n<br />
:n args<br />
:e #<br />
'f<br />
VI (l)<br />
Edit file when no write has occurred in<br />
current file, return to shell after edit, changes<br />
list in current file<br />
Edit starting at end<br />
Edit starting at line n<br />
Edit next file in list when vi was called with<br />
more than one file<br />
Specify new list of files to be edited<br />
Edit alternate file when two files are being<br />
edited<br />
Synonym for :e # .<br />
ESCAPING TO THE SHELL<br />
:sh Start a separate shell (to run several commands),<br />
return with 'D<br />
:!command Run one shell command, then return to<br />
current buffer<br />
MARKING AND RETURNING<br />
Previous context<br />
mx<br />
'x<br />
'x<br />
o o • at first non-white in line<br />
Mark position with letter x<br />
to mark x<br />
0 0 0 at first non-white in line<br />
MISCELLANEOUS OPERATIONS<br />
Repeat the last append, insert, open, delete,<br />
change, or put command<br />
Switch character from lowercase to uppercase<br />
and vice versa<br />
'? Delete or rubout interrupts<br />
i Split a line before the cursor<br />
a. Split a line after the cursor<br />
'L Reprint screen if '? scrambles it<br />
J Join lines<br />
:nu Line number cursor is on<br />
xp Switch characters<br />
SETTING OPTIONS<br />
Initializing Options<br />
:set x<br />
:set nox<br />
:set x=val<br />
:set<br />
:set a.ll<br />
Enable option x<br />
Disable option x<br />
Assign a value to x option<br />
Show changed options<br />
Show all options<br />
- 7-