home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
editor
/
ws_train.arc
/
EX4.WS
< prev
next >
Wrap
Text File
|
1987-01-30
|
6KB
|
130 lines
EXERCISE 4: BLOCK OPERATIONS
Mos⌠ oµ thσ command≤ wσ havσ seeε s∩ fa≥ worδ oε certaiε ì
amount≤ oµ text« Fo≥ examplσ Ctrl-∙ delete≤ onσ line¼ Ctrl-⌠ ì
delete≤ onσ word¼ Ctrl-τ delete≤ onσ character¼ anΣ Ctrl-Γ ì
reformat≤ onσ paragraph.
Iε thi≤ exercise¼ wσ wil∞ seσ ho≈ t∩ operatσ oε block≤ oµ ì
tex⌠ oµ an∙ sizσ yo⌡ choose¼ froφ ß singlσ characte≥ t∩ you≥ ì
entirσ document« Yo⌡ wil∞ learε t∩ movσ block≤ oµ text¼ t∩ cop∙ ì
them¼ t∩ deletσ theφ froφ thσ document¼ anΣ t∩ savσ theφ oε disk« ì
But¼ befo≥ yo⌡ caε tr∙ an∙ oµ thesσ operations¼ yo⌡ mus⌠ learε ì
ho≈ t∩ specif∙ thσ tex⌠ t∩ bσ operateΣ upon.
SELECTING A TEXT BLOCK
Tw∩ command≤ arσ useΣ fo≥ selectinτ ß blocδ oµ text║ start-ì
blocδ i≤ Ctrl-k-Γ anΣ enΣ-blocδ i≤ Ctrl-k-k« Tr∙ theφ ou⌠ b∙ ì
firs⌠ movinτ thσ curso≥ t∩ herσ ╪ anΣ hittinτ Ctrl-k-b¼ theε ì
movinτ i⌠ t∩ herσ ╪ anΣ hittinτ Ctrl-k-k« (Alternatively¼ yo⌡ ì
can use function keys FN7 and FN8).
Wha⌠ happened┐ A≤ sooε a≤ yo⌡ markeΣ thσ beginninτ oµ thσ ì
block¼ aε off-colo≥ "<B>ó appeareΣ oε thσ screen¼ t∩ reminΣ yo⌡ ì
wherσ thσ beginninτ was« Wheε yo⌡ completeΣ thσ blocδ b∙ hittinτ ì
Ctrl-k-k¼ i⌠ changeΣ color¼ s∩ tha⌠ yo⌡ coulΣ seσ wha⌠ wa≤ ì
marked.
If¼ wheε yo⌡ seσ thσ blocδ displayed¼ yo⌡ seσ tha⌠ yo⌡ diΣ ì
no⌠ marδ i⌠ exactl∙ a≤ yo⌡ wan⌠ i⌠ t∩ be¼ i⌠ i≤ ß simplσ matte≥ ì
t∩ fi° i⌠ up« Fo≥ instance¼ iµ thσ enΣ oµ thσ blocδ i≤ iε thσ ì
wronτ place¼ movσ thσ curso≥ t∩ thσ poin⌠ wherσ yo⌡ wanteΣ i⌠ t∩ ì
enΣ anΣ hi⌠ Ctrl-k-δ again« Wha⌠ coulΣ yo⌡ d∩ iµ thσ beginninτ ì
of the block were not exactly where you wanted it to be? (1)
Tr∙ movinτ thσ blocδ limit≤ around« Selec⌠ thi≤ entirσ ì
paragrapΦ a≤ ß block« No≈ changσ thσ limit≤ s∩ tha⌠ jus⌠ thi≤ ì
sentencσ i≤ thσ selecteΣ block« ╔ thinδ yo⌡ caε ge⌠ thσ hanτ oµ it.
OPERATIN╟ O╬ SELECTE─ BLOCK╙ -- MOVIN╟ ┴ BLOCK
Beinτ ablσ t∩ marδ ß blocδ oµ tex⌠ woulΣ no⌠ bσ ver∙ ì
interestinτ iµ wσ coulΣ no⌠ theε operatσ oε thσ selecteΣ block« ì
Let'≤ star⌠ b∙ movinτ thi≤ paragraph« Firs⌠ selec⌠ thσ paragrapΦ ì
usinτ Ctrl-k-Γ anΣ Ctrl-k-k« Theε movσ thσ curso≥ t∩ thσ thσ ì
placσ yo⌡ wan⌠ t∩ movσ thσ blocδ to« Tr∙ puttinτ i⌠ jus⌠ beforσ ì
thσ headinτ abovσ thi≤ paragrah« Wheε yo⌡ havσ thσ curso≥ a⌠ thσ ì
ne≈ location¼ givσ thσ move-blocδ command¼ Ctrl-k-v«
A≤ yo⌡ see¼ blocδ operation≤ arσ ß two-ste≡ process« firs⌠ ì
yo⌡ selec⌠ thσ blocδ t∩ bσ operateΣ on¼ theε yo⌡ givσ thσ commanΣ ì
to carry out the appropriate operation.
Caε yo⌡ movσ thσ markeΣ paragrapΦ bacδ t∩ it≤ origina∞ ì
location? (2) Do it.è
OPERATIN╟ O╬ SELECTE─ BLOCK╙ -- COPYING ┴ BLOCK
Copyinτ ß blocδ i≤ simila≥ t∩ movinτ one« Wha⌠ i≤ thσ ì
difference? (3⌐ T∩ tr∙ ou⌠ thσ block-cop∙ command¼ yo⌡ mus⌠ firs⌠ ì
select a block of text. Select this paragraph.
Okay¼ no≈ tha⌠ yo⌡ havσ selecteΣ thσ abovσ paragraph¼ movσ ì
thσ curso≥ t∩ thσ "Xó whicΦ follow≤ thi≤ paragrapΦ anΣ givσ thσ ì
block-cop∙ command¼ Ctrl-k-c«
X
D∩ yo⌡ seσ wha⌠ happened┐ ┴ duplicatσ oµ thσ selecteΣ tex⌠ ì
wa≤ inserteΣ jus⌠ beforσ thσ "X,ó bu⌠ thσ origina∞ paragrapΦ wa≤ ì
no⌠ changed« Thu≤ block-cop∙ differ≤ froφ block-move¼ whicΦ ì
erase≤ thσ orignia∞ afte≥ i⌠ i≤ moved.
OPERATIN╟ O╬ SELECTE─ BLOCK╙ -- DELETING ┴ BLOCK
Yo⌡ caε als∩ deletσ ß blocδ oncσ i⌠ i≤ selected« Tr∙ i⌠ ou⌠ ì
b∙ markinτ thσ followinτ paragraph¼ anΣ givinτ thσ block-deletσ ì
command¼ Ctrl-k-y«
áááááááááá No¼ don'⌠ deletσ me!!í Please¼ I'φ ì
áááááááááát∩ younτ t∩ die!!í Havσ yo⌡ n∩ mercy?┐ ì
ááááááááááDon'⌠ senΣ mσ t∩ worΣ processinτ ì
ááááááááááheaven!!!!
Bσ cautiou≤ wheε yo⌡ usσ thσ block-deletσ command¼ becausσ ì
oncσ yo⌡ issuσ it¼ thσ selecteΣ tex⌠ i≤ gone« Whilσ somσ ì
program≤ providσ aε "undoó commanΣ fo≥ deletions¼ WordSta≥ doe≤ ì
not.
OPERATIN╟ O╬ SELECTE─ BLOCK╙ -- SAVING IT ON DISK
Iµ yo⌡ writσ somethinτ tha⌠ yo⌡ thinδ migh⌠ bσ hand∙ iε ì
othe≥ documents¼ yo⌡ caε savσ i⌠ oε thσ disδ fo≥ futurσ use« A≤ ì
witΦ move¼ copy¼ anΣ delete¼ yo⌡ begiε b∙ specifyinτ thσ blocδ t∩ ì
be operated on.
Oncσ thσ blocδ i≤ selected¼ yo⌡ givσ thσ block-writσ ì
command¼ Ctrl-k-w« Tr∙ i⌠ ou⌠ b∙ markinτ thσ followinτ ì
paragraph« Wheε i⌠ i≤ marked¼ hi⌠ Ctrl-k-w« Oµ course¼ thσ ì
prograφ wil∞ neeΣ ß filσ namσ iµ i⌠ goinτ t∩ writσ thσ blocδ oε ì
disk¼ s∩ yo⌡ wil∞ bσ askeΣ t∩ suppl∙ one« Namσ i⌠ TES╘ anΣ savσ ì
i⌠ oε you≥ flopp∙ disδ (don'⌠ forge⌠ t∩ suppl∙ thσ drivσ a≤ wel∞ ì
as the file name).
Thi≤ paragrapΦ i≤ s∩ ho⌠ tha⌠ i⌠ i≤ ì
áááááááááágoinτ t∩ bσ saveΣ oε thσ disk« I⌠ mus⌠ ì
áááááááááábσ ß mucΦ bette≥ paragrapΦ thaε thσ onσ ì
ááááááááááwσ jus⌠ deleted« I⌠ ha≤ gooΣ breeding¼ ì
áááááááááácome≤ froφ ß gooΣ family« Clas≤ wil∞ ì
áááááááááátell.è
A≤ yo⌡ see¼ thσ blocδ i≤ stil∞ includeΣ iε thσ document¼ bu⌠ ì
therσ i≤ als∩ ß cop∙ oε your disk¼ unde≥ thσ namσ TEST. Onσ ì
las⌠ questioε -- wha⌠ woulΣ havσ happeneΣ iµ therσ werσ alread∙ ß ì
filσ nameΣ TEST oε you≥ disk┐ (4⌐ (tr∙ aε experimen⌠ insteaΣ oµ ì
just looking at the answer).
RECAPPING
WitΦ thi≤ exercise¼ yo⌡ havσ learneΣ t∩ selec⌠ o≥ designatσ ì
arbitrar∙ block≤ oµ tex⌠ and¼ oncσ selected¼ t∩ operatσ oε them« ì
Yo⌡ learneΣ t∩ move¼ copy¼ o≥ deletσ ß selecteΣ blocδ o≥ t∩ writσ ì
ß cop∙ oµ thσ blocδ oε disk« Thσ followinτ command≤ werσ ì
covered║
ì
Ctrl-k-b (or FN7)
ááááááááááCtrl-k-k (or FN8)
ááááááááááCtrl-k-v
ááááááááááCtrl-k-c
ááááááááááCtrl-k-y
ááááááááááCtrl-k-w