• Keine Ergebnisse gefunden

ex - text editor

Im Dokument Computer System (Seite 43-47)

S"(NOPSIS

UNIX Prcgrammer'

s

Manual

ex ( - ] ( -'" ] (

-t tAi ](

-r

H

+li:n.a'n.o ] lll1me ...

])£SCRlPTION

EX(UCB)

E=

1.1

the·

~e·t. of a tamily of ecUter'S: .dit . • : and vi. E: is a supenet of

.d.

W'ith

the" mest neubla extension being a display editiIli facility. Display based eclltm.g tI t.h8 focus of vi..

if

yeu bAve c.ct used ,eL or art! a cuual user. you will and that the ed.1tor

,du

is cenvanient tor yeUo

It

aveids sema of the cemplexities of , : used mostly by sys-tems programmen and pen OIlS vary familiar With

,a.

If you have a

en

term;nal you may Wish te use a display based editor, in this cue lee vi(UCE). wCich is a cemmand wbich focuses on the display edit.in& per-t10n of

u.

DOC:nI!NTAIIOK

Fcr .dit .and. U lee the E=/Idf.t cammand ~ - Veni.oft 2.

o.

't'he decu-ment Edi.l: A tutari4l pM)V'i.des a ccmprellec.sive i.n.U'1)duction te .dit assuming llO

previous kncwiedie of computen or the t1NlX system.

The E= R.!.ruu:. lla.n:u.al. - ~7'SWn 2. 0 is a cemprellensive and cemplete manual tor the cemmand mode teatures of I:. but. you can.i:lot. learn to use the editer by readi.n.& it.. For an introductien to more "dvanced !Or::lS of editm.g USU:1& the command mode of U" see the editing documents writ.ten by Brian Ker-niihan tor the editor ,eL' t.h8 material in the introductory and advanced docu-ments works also With u.

An J"n..tnrtw:titm. ta !X:rpla:y Editi.n.g wi.UL lot introduces the display eclltor vi and

p~vides reference material on vi.. The Vt Quick R.!rrrn.s:e cUfi sw:n.mari%es the commands of vi in a usetuJ.. tlmctional .... y. and is useful with t.h8 In.t"~t-..an..

FOR !!D OSZliS

If you have ust!d .d you will dnd that . : has a number ot new !eaturt!s useful on CRT Larm;nal ,. Intelli&ent t.erminal3 and biill speed t.erminals art! very pleasant t.a use With vi.. Generally. the editor uses tar men

ot

the- capabillt.:i.es of termi-D&ls than .~ does. and uses t.h8 terminal capability data base tarm.c~(UCB) and the type of t.h8 tarm.inal. you an usin& from the nnable 1'E1W in tbA environ-ment to cleterm.1lle ho" to driTe your terminal emcielltly. 't'he editor makes u.se of teaturws such as insert. and delete cllaractar and lli:e in lts 'rima! comm&lld (wmcn can be abbreViated ~) and which is the central mode

ot

edit1n.e when 1DinI vi(UCl!). Then is WO an interline ed.1Uc.& opeD. (0) cemmand which worles

Oil all term;nall •

E: contains a number of ne" teatures tor easily Vi.-winc the text

ot

the me. !he

• command liTes easy acc8SS to wtnde'WS of

tan.

Hittin& - D causes the editor to 1C~1l a half'-willd.ow of text and ls more useful tor quickly ste'PPini ~Uill So me t.h.an just nitt.iJl& return. Of coune. the acr.en orienteci Yisu.a1 mode .ivas con-.unt access to ed1t.1ll& conta:t..

E:;: &ives you more help wnen you make mistakes. 't'he tmdo (u) com.a;s.and a.llows you to revane any linile cb.a.n&a wCich ioes astray. E= (ives you a let

ot

teeci-back. c.crmally prillt.1nc ch&n&ed lines. and incllcates when more t.h.an a rew I.i:U!S

an urected by a command 10 thAt it 1.s easy to lietect when s comm&lld lla.s

&1!ectad mere Unes tha.n it should haTe.

1

EX(UC3) UNlX Programmer's Manual EX(UCE)

The editor also normally prevenu overwritin& existing mes UZlless you edited them so that you don't accident.a.lly clobber With a 1IJ7"'it. a ale other than the addition there is a co~med substitute command.. You give a raIlie of substitu-tions t.o be done and the eelit.or int.eractively uks whether each substitution lS

d.esired.

You ea.n use the I'UbsUtuta command in . : to systematically convert the case ot letters bet."een upper IUld lower case.

It

is possible to tinore case ot letters ill .earcb.es and. .ubstitutions. Ez also allows regulu expressions which mat.ch words to be constructed.. This is convenient. tor example. in searcb.in& tor the word "edit." if your document also contains the word "eelitor. ,.

E:: !las a set of O]'Nms which. you can .et to tailor it to your liking. One opt.:.on which is very u.setul is the =aaLndaftt opUon which. allows the edit.or to automati-cally supply leadini "hit.. space t.o aliin text.. You can then use the -D key as a.

baclctab and space and. tab !or"'Ward. t.o align new code easily.

KisceUaneous new uaetu1 features includ.e IUl int.eWaent loin

0)

command which IUpplies wbite space bet.ween joined. l1nes automatically. commancis

<

and

>

awk(l). ed.(l). ,"p(l) ••• d.el). eelit(lJO), ,rep(lJO), t.ermcap(lJO} • .t(lJC3)

4/41'79

3-3'1

2

a(OCE)

EX(UCE)

AUT.BCR

YW1Am Joy

The U2'I.da command causes all marla to be lost on lille! challied and then r.estored. it the marked. lines were cha.nied..

rOAdI:J never clean the bw!er mod.~d c:uldition.

~

• command prinb a number at logical rather than physicallmes. More thAn

&:Icreen tull

at.

output. may result it 10Zl& 1ic.es are present.

rue input/output erron don't print a name if the command l.1na ,_' option is

usect

The" is co easy way to do a sinale scan ignor'iIli cue.

Because at the implementation ot the ariuments to ft.:t, ocly ~12 bytes ot argu-ment list are allowed there.

The format af /etc/'t~1Zp and the large number ot capabilities ot termicals Wled by the editor causa tarminal type satup to ba rather slow.

The editor does not warn it text is placad in named bw!en and not used beiore exit1ni the editor.

Null charactars are discarded in input &es, and C&llllot appear ill resultant dies.

'"

~,,"',"

"" ""m",,", ""

~~, .,0"., ,",

"'""d,

w~."'. "" " .. , '" W~,

•• .. , " ' " ,,,'"

So Irom the above Ilow Chart, We Can cover ali the lines / edges with two test cases.

For getting the correct answer browse down to the end 01 this page

::<:.:<,;:« :>;::.»»

~. 48: Use the fOlloWing cOde;

'1

., 2j

It "liJ nlt:rt~ ''';

Im Dokument Computer System (Seite 43-47)