-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathed.hlp
2721 lines (1977 loc) · 111 KB
/
ed.hlp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
0 HELP
This is an online help library for the ED editor, a multi-window text and
binary file editor. For information about how this library works, enter "HELP".
To get rid of this message, hit RETURN.
ED works on a variety of terminals, and you can teach it how to deal with new
terminals with relatively little trouble. See the help topic 'terminals' for
more information about this.
1 ABORT
The same as QUIT, except that it terminates file list processing and multiple-
file mode. For example, if you specified -ffilename when you started ED, ABORT
would terminate the list processing prematurely. Similarly, if you used a wild-
card in a file name, ABORT would stop the wildcard processing and give you the
File> prompt immediately. You can also get out of multiple-file mode using
ABORT.
1 ascii
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI
1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US
2 SP ! " # $ % & ' ( ) * + , - . /
3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4 @ A B C D E F G H I J K L M N O
5 P Q R S T U V W X Y Z [ \ ] ^ _
6 ` a b c d e f g h i j k l m n o
7 p q r s t u v w x y z { | } ~ DEL
1 BOOKMARK
The BOOKMARK command creates a 'bookmark' file, which saves your place in a
file. The next time you edit that file, ED will position you at the same record
you were on when you last got out of the file.
What actually happens when you say BOOKMARK is this:
o Suppose you're editing a file called test.dat, and you're on the fifth
record in the file, on the eight byte. You issue the BOOKMARK command. ED
creates a file (in the same directory as the file itself) called test.dat-
EDbookmark, and writes the 5,7 into it. (The 7 is the offset from the first
byte to the eight byte.)
o When you leave the file (whether by EXIT, QUIT, ABORT or by closing a win-
dow), ED updates the bookmark file with your current position in the file.
o The next time you edit test.dat, ED will try to find a file called
test.dat-EDbookmark. If it finds such a file, and if it contains a
"number,number" string on the first line, ED assumes it's a bookmark file
and positions the cursor to the specified record and offset.
To make ED stop doing this, delete the bookmark file.
In general, it isn't a good idea to edit bookmarked files with other editors,
since this may make meaningless the position that is specified in the bookmark
file.
You can abbreviate the BOOKMARK command as BO.
1 box_mode
The SET BOX ON command puts ED in "box cut/paste" mode. In box mode, you can
cut rectangular areas out of your file, and paste them in elsewhere, preserving
their rectangular shape. The idea is to make it easy to cut a table and move it
somewhere else. Suppose you are looking at some text that looks like this:
Now is the time
For all good men
To come to the aid
Of their country.
If you moved to the i in 'is', hit SELECT, moved to the u in 'country', and hit
CUT, in normal cut mode the result would be:
Now untry.
and the paste buffer would contain:
is the time
For all good men
To come to the aid
Of their co
In normal cut mode, ED removes all characters from the beginning of the select
range to its end, including the "line breaks" that separate lines of the file
from each other. In box mode, what gets cut is always a rectangular area,
bounded on opposite corners by the cursor and the select marker. In the above
case, the box cut result would be:
Now ime
For men
To che aid
Of tntry.
and the paste buffer would contain:
is the t
all good
ome to t
heir cou
Thus in box mode, the number of lines in the file remains constant; only a sec-
tion of each line in a group gets cut. When you paste in box mode, ED inserts
the rectangular area you previously cut, starting at the cursor position, by
making a space in the middle of each line, and inserting data from the paste
buffer. This keeps the entire rectangle of data together.
Box mode does not affect other kinds of deletion from the file: DELC, DELW,
DELL, deletion/replacement of search strings, and SUBST work in the normal way
regardless of the box mode state. Only CUT and APPEND perform the box mode
operation, and only if you enable it.
Note: when you use box cut and paste, ED converts all TAB characters in the
affected lines to spaces. Also, box mode doesn't work in any useful way when
you are in binary or hex mode (using the -b and -h options when you invoke ED).
Another peculiarity: when you are in a diredit buffer, and box mode is on, and
you SORT a select range, ED trims trailing spaces from the file names involved
in the sort. If one of the files actually had trailing spaces in its name, ED
would not know this, and would trim them off. From that point forward, you
would be unable to visit that file, because the trailing spaces would be
absent.
1 BIGGER
The BIGGER command makes the window the cursor is in bigger. The syntax is
BIGGER lines, where lines is how many additional screen lines you want the win-
dow to occupy. Other windows are made smaller to accommodate the new size.
You can abbreviate the BIGGER command as BI.
1 BYTE
The BYTE command inserts a single byte into the current buffer. You specify the
value of the character in the BYTE command itself: BYTE 32, for example would
insert a space character (whose ASCII value is 32). BYTE is very similar to the
SPECINS keypad command, except that you can use the results of a calculation to
determine which value the inserted character has.
You can abbreviate the BYTE command as BY.
1 CALCULATE
The CALCULATE command takes the entire line the cursor is on and feeds it to
the calculator, which tries to evaluate it as an arithmetic expression. The
calculator puts the result of the calculation (or, possibly, an error message)
in the PASTE buffer.
You can abbreviate the CALCULATE command as CA.
2 expressions
The calculator takes algebraic expressions as you would see them in a math
textbook. For example, 2+2. It recognizes '+' for addition, '-' for subtrac-
tion, '*' for multiplication, '/' for division, and '^' for exponentiation. The
order of evaluation is left to right for everything. You may use parentheses
freely.
2 intrinsic_functions
The calculator recognizes the following functions:
abs absolute value exp exponential
sin sine of angle(radians) ln naperian logarithm
sind sine of angle(degrees) log decimal logarithm
cos cosine of angle(radians) sqrt square root
cosd cosine of angle(degrees) fact factorial
tan tangent of angle(radians) arcsin arc sine(radians)
tand tangent of angle(degrees) arcsind arc sine(degrees)
cot cotangent of angle(radians) arccos arc cosine(radians)
cotd cotangent of angle(degrees) arccosd arc cosine(degrees)
csc cosecant of angle(radians) arctan arc tangent(radians)
cscd cosecant of angle(degrees) arctand arc tangent(degrees)
sec secant of angle(radians) sinh hyperbolic sine
secd secant of angle(degrees) cosh hyperbolic sine
int integer part of a number tanh hyperbolic tangent
For example, to get the decimal logarithm of seven factorial, you would enter
log(fact(7)) on a line by itself, issue the CALCULATE command, and then PASTE
the result into the file.
2 limitations
Some of the math functions place limitations on what numbers you can feed them.
These limits are:
o tan, tand, sec, secd -- angle must not be 90 or 270 degrees.
o cot, cotd, csc, cscd -- angle must not be 0 or 180 degrees.
o exp, sinh, cosh -- absolute value of the number must be less than 88.7.
o arcsin, arcsind, arccos, arccosd -- number must be between -1 and 1.
o sqrt -- number must be nonnegative.
o ln, log -- number must be positive.
o fact -- number must be between zero and 33.99999.
1 CD
The CD command changes your current working directory. The command syntax is CD
directory, where directory is where you want to go. The behavior of this com-
mand depends to some extent on which kind of operating system you're using. On
some systems, when you CD within ED and then leave ED, the operating system
puts you back where you were when you ran ED. Other systems leave you where you
last CD'ed to.
1 changing_case
The CHGCAS key changes the case of either the select range (if it is active),
the search string (if the cursor is sitting on it), or the character the cursor
is on (if neither of the first two options apply). The default behavior for
this key is the same as EDT's, but ED allows other options. You can use the SET
CASE command to change the behavior of CHGCAS. See the help on SET CASE for
more information.
1 commands
To get into command mode, do either GOLD [7] or press control-Z. You will get a
Command> prompt. Enter the command you want to use, and press RETURN or ENTER.
If you go into command mode by mistake and you want to go on editing, just hit
RETURN (an empty command is ignored). Note that as soon as ED finds a unique
match on the command name you type in, it ignores any further characters in the
command.
The valid commands are:
HELP BYTE
EXIT QUIT ABORT TRIM
INCLUDE WRITE CD PWD
SET SHOW BIGGER SMALLER
STORE RESTORE LOAD UNLOAD
DATE TIME FILE SORT
CALCULATE DELETE
GREP PERG BOOKMARK
SUBSTITUTE
To get help on a particular command, respond to the Command> prompt with
HELP command-name
1 defining_keys
Editing tasks tend to be repetitive, so most editors allow you to store some
sequence of editor commands "under" a key, so that when you want to do that
sequence of operations, all you have to do is hit that key. This storage of
commands is called "defining" the key. Some keys are so essential to the proper
functioning of ED that they cannot be defined. The ones that can be defined
are:
o Keypad keys (except for GOLD)
o Any GOLD-alpha combination (like GOLD-Q, for instance)
o Any control key other than ^K, ^Q, or ^S
o Any user function key (see help on 'terminals')
o Any alphanumeric key (see help on 'alpha_keys')
To define a key, first hit control-K (press the K key while holding down the
Ctrl key). Then press the key you want to define (any of the above keys). Now
you can edit your file as you usually do, but ED will record each keystroke you
make. When you get done defining the key, hit control-K again. That will store
the keystroke sequence under the defined key. For the remainder of your editing
session, each time you press the key you defined, the entire sequence of keys-
trokes you entered will be played out.
2 alpha_keys
Certain restrictions apply when you are defining main keyboard keys. For
example, if you were using a text processor and wanted to have a key like 'a'
to come out as '^a/', ED might take the 'a' in the result string as a command
to put the whole string out again. This kind of "recursion" would make life
difficult, so some special rules apply when you are using defined alphanumeric
keys:
o alphanumeric defined keys are not recursive.
o alphanumeric keys do not evolve into their definitions they are used within
another definition.
o alphanumeric keys do not evolve into their definitions when you type them in
response to any editor prompt. (You have to be able to communicate with ED!)
2 saving_keys
After you have defined some keys, you can save the definitions by entering com-
mand mode and responding to the Command> prompt by entering STORE KEYS. This
will cause ED to create a new version of your editor startup file, and store
all of your currently active key definitions in that file. ED will automati-
cally retrieve these key definitions from this file whenever you start it up.
2 restoring_keys
If you have been messing around with your key definitions, and you want to
restore them to their original values, enter command mode and respond to the
Command> prompt by entering RESTORE KEYS. This will cause ED to read in your
standard definitions from your startup file and reset all the key definitions
accordingly.
2 undefining_keys
To remove any definition from a key, hit control-K, press the key you want to
remove the definition from, and hit control-K again. This will make the key do
whatever it ordinarily does.
1 DELETE
The DELETE command works only when you are editing a directory. In this mode,
you can mark files for deletion by hitting DELLINE (or using the CUT command on
a set of files). The marked files will appear in reverse video. Once you have
marked the files you want to delete, you issue the DELETE command. ED deletes
the marked files and redisplays the directory.
1 DATE
The DATE command loads the paste buffer with the current date in the format
DD-MMM-YY, where DD is the day of month, MMM is the month, and YY is the year.
You can use the single letter D as an abbreviation for DATE.
1 environment_vars
ED optionally uses two environment variables to specify the number of rows and
columns on the screen as defaults if the values on the command line are
specified as zero. ROWS is an integer value containing the number of lines on
the screen, and COLS is an integer value containing the screen width.
ED will also replace environment variables imbedded in file names (both in file
prompts and in the user setup file) if they are preceeded by a $. For example,
a file specified as $HOME/test.dat on an ED internal prompt would be expanded
the same way as the shell would expand it in unix. The special substitution ~/
at the start of a file name is translated to the "HOME" environment variable.
If the string following a $ is not a valid environment variable no modification
is made to the file name.
Environment variable substitution is not available on VMS, and does not handle
~username type syntax on any systems.
1 EXIT
Creates a new version of the file you are currently editing, incorporating all
the changes you have made.
If you are using the -k backup option, you can suppress creating the backup for
this file using the -n option. For example, EXIT -n will not save the old file.
This is sometimes useful if you want to save the contents of the previous
backup file.
You can use the single letter E as an abbreviation for EXIT.
1 features
ED will:
o Display many files on the screen simultaneously (see windows).
o Let you edit files and directories on other systems (see FTP).
o Save key definitions and other editor settings on command (see STORE).
o Let you mark your spot in a file, and return to it easily (see MARK).
o Let you put tab stops wherever you want them (see tabs).
o Let you use wildcards or regular expressions in search strings (see search).
o Let you redefine the keys on your terminal (see defining_keys).
o Let you say things like: ED *.dat, if you want to edit all .dat files (see
wildcards).
o Allow you to teach it how to talk to different terminals (see terminals).
o Calculate the value of algebraic expressions that include math functions
(see CALCULATE).
o Sort a file or a portion of a file (see SORT).
1 FILE
The FILE command loads all or part of a file name into the paste buffer. The
behavior of this command depends on whether you are in a diredit buffer or in a
file. If you are in a diredit buffer, ED takes the name of the buffer and
splices the filename the cursor is on onto the end of it. If you're in a file,
ED uses the file name.
Once ED has built the file name as described above, it puts all or part of the
name into the paste buffer, according to the following plan:
If you say FILE DIRECTORY, it puts only the directory name into the paste
buffer.
If you say FILE NAME, it strips off the directory and puts only the file name
in the paste buffer. Note that FILE by itself is the same as FILE NAME.
If you say FILE FULL, it puts the entire name into the paste buffer.
You can abbreviate the FILE command as F. You can abbreviate DIRECTORY as D,
NAME as N, and FULL as F.
1 ftp
ED is capable of manipulating files on other systems, using the FTP file
transfer protocol. If you are connected to a network that supports TCP/IP, you
can specify directories and files on other systems by using one the following
syntaxes:
/host.xxx.yyy:/dir1/dir2...
or
/user@host.xxx.yyy:/dir1/dir2...
If you use the form that includes the username, ED will prompt you for the
password. If the filename you specify is a directory, you will go into direc-
tory mode. Otherwise, the specified file will be retrieved using ASCII transfer
mode, or BINARY mode if you specified -b when you named the file.
If you leave the directory/filename off completely, the root directory for FTP
will be where you end up (in directory mode). This may not work on certain VM
systems that require you to know a directory name.
Note that FTP servers on non-Unix systems are not very well standardized. If
you try to open a remote file or directory, and nothing happens for a while,
wait a bit longer. You should eventually (perhaps after about one minute) get a
timeout message if the connection fails. You may get other messages, depending
on the situation. In general, you should either connect to the host or get some
kind of message. If neither happens, write to sandmann@clio.rice.edu, telling
what kind of system you were running ED on, what kind of system you were trying
to connect to, and what message(s) appeared on your terminal. (If you're on a
Unix system, you may be able to use the 'script' command to capture this infor-
mation.)
There are FTP servers out there that are simply horrible and ED cannot help you
much with them. ED currently understands about a dozen different server styles,
but surely there are more out there. If ED is unable to get file permissions or
modification dates, it uses ????????? for the permissions and 2-Feb-1955 06:35
for the modification date. (The ????????? does not necessarily mean you cannot
access the file. You just have to try it.)
Note that you can interrupt the FTP transfer of a file (or a directory listing)
by typing ^C. The file (or directory listing) will still appear on the screen,
but it won't be complete.
When talking to FTP servers, ED classifies the remote machine into one of two
groups, which have different syntaxes. Windows NT, MS-DOS, OS/2 and Unix sys-
tems all look like unix systems, that is, filenames look like /a/b/c... All
other systems (including VMS, VM and MTS) look like VMS systems, where
filenames look like DEVICE:[DIRECT.DIRECT1...]. You can't send a VMS-emulating
system a unix filename and expect it to work. The easiest way to deal with
remote systems when you don't know which kind they are, is to just specify
/hostname: (or /user@hostname:). This will put you in the default directory for
the account you specify, and the top row of the window will display the system
type in parentheses. It's pretty obvious, once some filenames have been
displayed, which kind of beast you're talking to.
1 GREP
The GREP command searches through an entire file, looking for a string that you
supply. It produces a new window that shows each appearance of the string,
along with (optionally) indications of how many intervening lines did not con-
tain the string. The syntax is:
GREP string
You can control whether GREP displays intervening line counts by using the SET
GREP command. See the help on SET GREP for more about this. You can abbreviate
the GREP command as G. Note that there is a command that does the opposite of
what GREP does, called PERG.
1 HELP
The HELP command makes ED provide information about various features and
issues. The command works as follows:
o If you just type HELP, you get a list of topics, and it waits for you to
type in a topic name.
o When you type in a topic name, ED displays the help information, and may
print a list of subtopics. You can select one of these by typing the subto-
pic name in. At this point, you would be "one level down" in the HELP
hierarchy. Hitting RETURN without typing any topic moves you up in the
hierarchy.
o Hitting RETURN at the top level gets you out of HELP.
o You can specify a chain of topic names in a HELP command: HELP DEFI ALP, for
example, would get you in the subtopic 'alpha keys' of the topic
'defining_keys'.
1 INCLUDE
The INCLUDE command inserts an entire file at the current location in the file
you're editing. The command syntax is INCLUDE filename. Wildcards are allowed
in the file name; the first matching file ED finds is the one it includes.
Default extensions (from your startup file) will be applied if filename does
not have an extension.
You can use the single letter I as an abbreviation for INCLUDE.
1 invoking_ed
When you invoke ED, you must specify a number of parameters so it knows how to
talk to your terminal, where to get your key definitions, and so on. The
required parameters are, in order:
1 The terminal file name that is appropriate for your terminal.
2 The name of your personal startup file.
3 The number of lines on your terminal screen.
4 The number of columns on your terminal screen.
5 (Optionally) one of the options listed under the 'options' subtopic.
6 (Optionally) the name of the file you want to edit, or -ffilename, where
filename is a file that contains a list of files you want to edit. If you
specify -f without a filename, a list of file names is read from standard
input (which lets you do some pretty amazing things under systems that
support pipes).
If you don't provide a file-to-edit, ED will prompt you for one. The
modifiers described above are ignored when you respond to prompts.
The parameters must be separated by spaces. Ordinarily, there will be a symbol
or alias defined when you log in that takes care of the first four parameters.
2 filenames
If you start ED and don't supply a filename, it will prompt you for one as fol-
lows:
File>
If you don't want to edit after all, hit RETURN to get out.
You can enter more than one filename at once if you like. Separate the
filenames with spaces. If you want to edit a file whose name contains spaces,
enclose the name in double quotes (e.g.: "this is a filename"). To put an
actual double quote in the file name, use \". To put a backslash in the file
name, use \\. For example, if the file's name were:
this is a long spacey file name with "double quotes"
you would name the file as:
"this is a long spacey file name with \"double quotes\""
You can precede a filename with -f and ED will treat that file as a list of
filenames that you want it to edit in sequence.
You can use wildcards in the filename if you wish. The implementation of this
varies from system to system. On AIX systems, for example, there is a system-
defined limit on the number of file names that can be expanded by the shell. In
VMS, however, the wildcards are handled within ED and there is no limit. See
the help on 'wildcards' for a complete description of wildcard processing.
When you are editing from a list, or from a wildcarded file name, you may want
to stop the list or wildcard processing. To do this, see the help on the ABORT
command.
When the file name you specify is a directory file, ED goes into a 'diredit'
mode. In this mode, ED displays a list of all the files in the directory, along
with the size of each file (in bytes), its last-modification date and time, its
permissions, and an indication of whether it is a directory (directories have a
'd' character in the first column). You can move around in the file list in the
usual way - as far as ED is concerned, it's just another buffer (with certain
limitations, see below).
To view a file, move the cursor to the line containing the file name, and press
'a' if the file is ASCII, or 'b' if it is a binary file. This creates a new
window with the file in it. If the file you hit 'a' or 'b' on is a directory,
ED 'moves' to that directory and gives you a new file list. You can move up one
level in the file system by hitting 'a' or 'b' when the cursor is on '..'
(unix) or '[-]' (VMS). For moving around directories, 'a' and 'b' are
equivalent; the distinction between them applies only when visiting a file.
Note that you can use the RETURN key as a substitute for the 'a' key.
Certain limitations apply to directory-mode buffers: you can't edit them by
inserting or deleting characters, and you can't use the INCLUDE, WRITE, BYTE,
TRIM or SUBSTITUTE commands. (You can, however, SORT them).
If you are connected to the Internet, you can edit files on other systems with
ED. See the help topic FTP for more about this.
2 options
-r or
-rfilename specifies that ED should go into recovery mode, in which editor
commands are taken from a journal file instead of the terminal. If
you leave off the filename, ED takes commands from the default
journal file, which is defined in your ED startup file.
-t or
-tfilename same as -r, except that no terminal i/o is performed, and ED quits
when it gets to the point where it would ask you for another file
to edit. This option is good for text processing applications,
where you are using a journal file to control some kind of
automatic text processing on a file.
-f or
-ffilename makes ED treat the specified file as a list of names of files to
edit, which ED opens one after another. If filename is not speci-
fied, ED reads file names from the standard input (on non-VMS sys-
tems).
-k or
-kdirname makes ED keep a backup copy of any files it updates on disk. If
you use just -k, the backup file is called whatever the file was
called, with the extension changed to ".BAK". If you specify a
directory (e.g.: -k~/trash) the old version of the file is moved
to that directory, and its name remains unchanged.
-sstring lets you specify the current search string.
-pstring lets you specify the contents of the paste buffer.
-lstring lets you specify the contents of the line buffer.
-wstring lets you specify the contents of the word buffer.
-cstring lets you specify the contents of the char buffer.
-v prints ED's version number and licensing information, then quits.
-u makes ED display the cursor position constantly.
-b makes ED go into 'binary' mode. Use this to edit binary files.
-h makes ED go into 'hex' mode, which is identical to binary mode
except that all characters appear in <hex> format.
-1 prevents prompting for additional files (one pass mode).
-m makes ED go into 'multiple-file' mode. When you use -m, ED tries
to open all the files you specify at once, in multiple windows on
the screen. If there are more files than will fit on the screen,
it opens as many as it can, and then opens more after you EXIT or
QUIT. You can break out of multiple-file mode by using the ABORT
command.
-innn makes ED move the cursor to line nnn of the file when it starts
up. Line 1 is the first line of the file.
-z makes ED go into a special 'tutorial' mode, where you can teach it
about your keyboard. In this mode, ED prompts you for the name of
an existing configuration file (use one that you think might work
marginally with your terminal) and then asks you to press all the
key combinations it understands, followed by the RETURN key. It
then creates a new configuration file (which you name) that will
work with the particular keyboard you're using. We generally keep
our configuration files in the same directory where ED lives, but
that isn't necessary, since the configuration file is one of the
command-line arguments you specify when you run ED.
1 keypad
This is the arrangement of the keys on the keypad. The arrow keys (UP, DOWN,
RIGHT, LEFT) are not shown, since they are pretty much self-explanatory, and
they appear in all sorts of different places.
+-------+-------+-------+-------+
| |WINDOW | FIND | UNDL | The upper entry on each key gives the
| [PF1] | [PF2] | [PF3] | [PF4] | function of that key if GOLD is pressed
| GOLD | CLONE |FNDNXT | DELL | immediately before the key is pressed. The
+-------+-------+-------+-------+ lower entry is the function if only the key
|COMMAND| FILL |REPLACE| UNDW | itself is pressed. The two-stroke sequence,
| [7] | [8] | [9] | [-] | GOLD-key, is treated as one keystroke by ED.
| PAGE |SECTION|APPEND | DELW |
+-------+-------+-------+-------+ Note that keyboards may vary. Sparcs, for
|BOTTOM | TOP | PASTE | UNDC | example, have no [,] key, so that function
| [4] | [5] | [6] | [,] | appears under the [Pause] key, the [-] key
| FORW | BACKW | CUT | DELC | is the UNDL/DELL key, and the [+] key is
+-------+-------+-------+-------+ the UNDW/DELW key. Of course, you can cust-
|CHGCASE|DELEOL |SPECINS| SUBST | omize all this by creating your own terminal
| [1] | [2] | [3] | | description file.
| WORD | EOL | CHAR | |
+-------+-------+-------+[Enter]|
| OPENLINE | RESET | |
| [0] | [.] | |
| NEXTLINE |SELECT | ENTER |
+---------------+-------+-------+
2 details
This section contains detailed descriptions of the functions of the keypad
keys. In general, it is important to understand that each key has two functions
built in. You get one function (the lower one in the diagram) if you just press
the key. You get the other function if you press the GOLD key, and then press
the key. So when we say something like "press SUBST," we mean 1) press the GOLD
key, and 2) press the key at lower right on the keypad.
It is also important to understand that many of the cursor movement keys have
"forward" and "backward" modes, which depend on which "direction" you are
going. The FORW and BACKW keys set this direction. So, to move forward in the
file one word at a time, you would first press FORW, and then press WORD
repeatedly. The current direction also determines which way ED goes when you
initiate a search for a string of characters.
3 UP
Moves the cursor to the previous record in the file.
3 DOWN
Moves the cursor to the next record in the file.
3 RIGHT
Moves the cursor one character to the right. If the cursor is at the end of a
record, it moves to the start of the next record in the file.
3 LEFT
Moves the cursor one character to the left. If the cursor is at the start of a
record, it moves to the end of the previous record in the file.
3 NEXTLINE
If the current direction is forward, moves the cursor to the beginning of the
next line. If backward, moves the cursor to the start of the current record,
unless it is already there, in which case it moves to the start of the previous
record.
3 OPENLINE
If the cursor is at the start of a record, creates a new, empty record. Other-
wise, splits the current record in two.
3 WORD
Moves to the next word in the current direction. You define what characters
delimit words by using the SET WORD command.
3 CHGCASE
Changes the case of characters in one of three ways:
1 If a select range is defined, the characters in the range are changed.
2 Otherwise, if you are on the current search string, the case of the char-
acters in the string is changed.
3 Otherwise, the case of one character is changed, and the cursor moves one
character in the current direction.
You can alter the way case-changing works by using the SET CASE command. See
the help on SET CASE for more info.
3 EOL
If the current direction is forward, moves the cursor to the end of the current
record, or the end of the next record if it is already at the end of the
current record. If backward, moves to the end of the previous record.
3 DELEOL
Deletes from the cursor to the end of the current record. If the cursor is at
the end of the current record, nothing happens. Note that DELEOL does not
delete the line break itself, as DELL does. Any deleted characters are stored
in the LINE buffer, and can be reinserted with the UNDL command.
3 CHAR
Moves one character in the current direction.
3 SPECINS
Inserts any eightbit character. For example, to insert a DEL character, press
GOLD, then enter 127 using the numeric keys on the main keyboard, then hit
SPECINS.
3 FORW
Sets the current direction to forward.
3 BOTTOM
Moves to the end of the file.
3 BACKW
Sets the current direction to backward.
3 TOP
Moves to the beginning of the file.
3 CUT
If a select range is defined, deletes it. Otherwise, if the cursor is on the
search string, deletes that. The deleted characters are stored in the PASTE
buffer, and can be reinserted using the PASTE command. This operation is often
called "killing," and PASTEing is called "unkilling."
3 PASTE
Inserts the contents of the PASTE buffer at the cursor position. See CUT for
more information.
3 PAGE
Moves to the beginning of the next or previous page, depending on the current
direction. Pages are defined by means of a "page delimiter string," which you
can control with the SET PAGE command.
3 COMMAND
Lets you enter editor commands. Try HELP to get started.
3 SECTION
Moves the cursor one "section" in the current direction. This is eighteen lines
by default, and you can change it with the SET SECTION command.
3 FILL
Performs word fill on the select range. The right margin is controlled by the
SET WRAP command.
3 APPEND
This command is like CUT, except that what gets killed is appended to what's
already in the PASTE buffer, rather than replacing it.
3 REPLACE
This command requires that the cursor be on the search string. If it is, it
deletes the search string and inserts the contents of the PASTE buffer at that
spot. The SUBST command is similar, but it automatically takes you to the next
appearance of the search string.
3 DELW
Deletes from the cursor to the start of the next word in the file. The deleted
character are stored in the WORD buffer, and can be reinserted using the UNDW
command.
3 UNDW
Inserts the contents of the WORD buffer at the cursor position.
3 DELC
Deletes one character at the cursor position, storing it in the CHAR buffer.
The character can be reinserted using the UNDC command.
3 UNDC
Inserts the contents of the CHAR buffer at the cursor position.
3 SELECT
Marks one end of the "select range," which is defined as all the characters
between this mark and the cursor position. You use this to kill large blocks of
text: 1) move somewhere and press SELECT, 2) move somewhere else, 3) press CUT.
Everything from the SELECT spot to the cursor is killed, and stored in the
PASTE buffer. ED marks the SELECT position with a little reverse-video box. If
a SELECT spot is already defined, and you press SELECT somewhere else, the
first selection goes away. You don't have to use RESET, as you do with EDT.
3 RESET
Turns off the select range. Does nothing if you haven't SELECTed a spot.
3 SUBST
The SUBST key deletes the search string, replaces it with the contents of the
paste buffer, and then searches for another occurrence of the search string. To
use the SUBST key, enter the following commands:
1 Press FIND
2 Enter the text you want to replace.
3 Press FORW or BACKW, to set the search direction and find the first
occurrence of the string.
4 Press SELECT.
5 Type the text you want to replace the search string with.
6 Press CUT.
7 Press SUBST.
Each time you press SUBST, ED will make a substitution and locate the next
occurrence of the search string. You can use a repeat count for multiple sub-
stitutions.
This command requires that the cursor be on the search string. Hitting SUBST
when you are not on the search string does nothing.
3 CLONE
Alters the behavior of any immediately following kill-type command, so that
what would have been killed remains in the file, but the 'killed' area is
copied to the appropriate kill buffer just as it normally is when you kill.
3 WINDOW
Puts you in window command mode. See the help on windows for more information.
3 FNDNXT
Finds the next appearance of the search string, seeking in the current direc-
tion. Beeps if it is not found, otherwise moves the cursor there.
3 FIND
Initiates a search with a new search string. To find something, do a FIND,
enter the string, then press FORW to search forward, or BACKW to search back-
ward. You can recall previously-typed search strings. See the help on
recall_commands for some tips about this.
3 DELL
Deletes from the cursor to the end of the current record, and splices the
following record onto the current record. The deleted characters are stored in
the LINE buffer, and can be reinserted using the UNDL command.
3 UNDL
Inserts the contents of the LINE buffer at the cursor position.
1 license
ED is an enhanced EDT-like editor, Copyright (C) 1992 by Rush Record (author).
Copyright (C) 1993 by Charles Sandmann (sandmann@clio.rice.edu) maintainer.
ED is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation.
ED is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License (COPYING)
along with this program; if not, write to:
The Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
If you did not receive a copy of the source code and would like a copy, or
have questions or comments please email or write to:
Charles Sandmann (sandmann@clio.rice.edu)
527 Asheboro
Katy, TX 77450
1 LOAD
The LOAD command loads key definitions from an unload file, which you can
create using the UNLOAD command. The ordinary sequence of operations is: 1) you
use the UNLOAD command to create a listing of your key definitions, 2) you edit
that file as you see fit, and 3) you use the LOAD command to load the key
definitions from that file. You would then ordinarily STORE KEYS to make the
changes permanent (after you tested the defined keys, of course).
The syntax of the command is LOAD filename, where filename is the name of the
file containing the key definition listing.
You can abbreviate the LOAD command as L.
1 mark
The MARK and RETURN keys allow you to mark your place in a file and then return
to it after you've been doing things elsewhere.
When you hit MARK, your current cursor position is stored. If you go somewhere
else in your file, then hit RETURN (the special 'RETURN' key, not carriage
return), you will move back to the last spot you marked. If you are on a marked
spot, and hit MARK, that spot will be un-marked. If you have marked more than
one spot, and you hit RETURN repeatedly, you will cycle among the marked spots.
On some terminals, these functions are defined as follows: MARK is GOLD <down
arrow>, RETURN is GOLD <up arrow>. On the sparc, however, MARK is the 'Stop'
key, and RETURN is the 'Again' key.
You can have up to eight spots marked at any time.
1 newsreader
ED has a built-in network newsreader facility, which is enabled by running ED
in one of the following ways:
ED -n <news-server-hostname>
ED -N <news-server-hostname>
If you use -n, ED will display only those newsgroups you are subscribed to (as
indicated in your .newsrc file). If you use -N, ED displays all the newsgroups
your server knows about, signifying the unsubscribed groups by displaying them
in reverse video.
I have tried to keep the user interface simple; except for Posting, you need
only know two commands: 'read' (by typing 'r' or 'R') and 'visit' (by typing
'v' or 'V') The difference between read and visit is the read displays a group
or article, but leaves the cursor where it was. Visit, on the other hand, moves
the cursor to the just-created window.
The following topics describe the newsreader's user interface.
2 group_window
When you invoke the ED newsreader, it displays newsgroups in what we'll call
the 'group window'. This window is much like a diredit window, in that only
certain keys have any valid function. All the cursor movement keys function in
the normal way. FIND and FINDNXT also work as you would expect. Inserting or
deleting text, however, is not allowed. As with diredit mode, DELLINE and KILL
will mark a group or set of groups in reverse video. Normal video means you are
subscribed to a group, reverse means unsubscribed. Reapplying DELLINE or KILL
will turn reversed groups into normal ones.
To select a group, press 'r', 'R', 'v' or 'V'. This will make ED display the
articles of that group in another window, called the 'article window'. If
there are more than 50 articles in the group, ED will ask you how many you want
it to list in the article window. If you just hit RETURN here, ED reads all of
them. If you enter a number, say N, ED reads the first N articles. If you enter
a range of numbers, say N-P, ED skips the first N-1 articles, and then reads
the next P-N+1 articles.
The 'r' and 'R' commands leave the cursor in the group window after the article
list has been displayed. 'v' and 'V' automatically move the cursor to the start
of the article list.
If you use an uppercase command ('R' or 'V') to call up the article window, ED
displays all of the articles in the group, even the ones you've already read.
In this case, the already-read articles are indicated in reverse video. If you
use lowercase, only the unread articles are displayed.
See the help topic 'article_window' for a description of the article window
interface.