-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurlew.l
2144 lines (2144 loc) · 53.6 KB
/
curlew.l
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
.ds f. curlew.t
.TH curlew 1 local
.SH NAME
curlew,cl \- SSMP Screen Editor
.SH SYNOPSIS
.B curlew
file [command]
.SH Essential context editor commands
.TS
.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
.de 35
.ps \n(.s
.vs \n(.vu
.in \n(.iu
.if \n(.u .fi
.if \n(.j .ad
.if \n(.j=0 .na
..
.nf
.nr #~ 0
.if n .nr #~ 0.6n
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.fc
.nr 33 \n(.s
.rm 80 81
.nr 80 0
.nr 38 \wwrite
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wquit
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wedit myotherfile
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wview
.if \n(80<\n(38 .nr 80 \n(38
.80
.rm 80
.nr 81 0
.nr 38 \wWrite file buffer contents to edited file
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wEnd the editor session
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wEdit a new disk file "myotherfile"
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wEnter (or exit) full-screen operation
.if \n(81<\n(38 .nr 81 \n(38
.81
.rm 81
.nr 38 1n
.nr 79 0
.nr 40 \n(79+(0*\n(38)
.nr 80 +\n(40
.nr 41 \n(80+(3*\n(38)
.nr 81 +\n(41
.nr TW \n(81
.if t .if \n(TW>\n(.li .tm Table at line 14 file curlew.t is too wide - \n(TW units
.fc
.nr #T 0-1
.nr #a 0-1
.eo
.de T#
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.mk ##
.nr ## -1v
.ls 1
.ls
..
.ec
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'write\h'|\n(41u'Write file buffer contents to edited file
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'quit\h'|\n(41u'End the editor session
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'edit myotherfile\h'|\n(41u'Edit a new disk file "myotherfile"
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'view\h'|\n(41u'Enter (or exit) full-screen operation
.fc
.nr T. 1
.T# 1
.35
.TE
.if \n-(b.=0 .nr c. \n(.c-\n(d.-6
.LP
From full-screen operation, first press ESC then 6 to get a command
prompt. When complete, press RETURN to enter the command. If a
filename is given with a "write" command the file buffer will be
written to the specified file instead of the edited file.
.SH Control key action during full-screen operation
.TS
.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
.de 35
.ps \n(.s
.vs \n(.vu
.in \n(.iu
.if \n(.u .fi
.if \n(.j .ad
.if \n(.j=0 .na
..
.nf
.nr #~ 0
.if n .nr #~ 0.6n
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.fc
.nr 33 \n(.s
.rm 80 81 82 83 84 85
.nr 80 0
.nr 38 \w^Q
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^W
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^E
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^R
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^T
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^Y
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^U
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^I
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^O
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w^P
.if \n(80<\n(38 .nr 80 \n(38
.80
.rm 80
.nr 81 0
.nr 38 \winsert line
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wchar/line toggle
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete character
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete word
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete line start
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete line end
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete line
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wnext tab
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wsplit line
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wcombine with next
.if \n(81<\n(38 .nr 81 \n(38
.81
.rm 81
.nr 82 0
.nr 38 \w^A
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^S
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^D
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^F
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^G
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^H
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^J
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^K
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w^L
.if \n(82<\n(38 .nr 82 \n(38
.82
.rm 82
.nr 83 0
.nr 38 \walign text
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \winsert space
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wdelete blanks
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wprevious tab
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \whome cursor
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wcursor left
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wcursor down
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wcursor up
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wcursor right
.if \n(83<\n(38 .nr 83 \n(38
.83
.rm 83
.nr 84 0
.nr 38 \w^Z
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \w^X
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \w^C
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \w^V
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \w^B
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \w^N
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \w^M
.if \n(84<\n(38 .nr 84 \n(38
.84
.rm 84
.nr 85 0
.nr 38 \wcursor line start
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wcursor text start
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wcursor text end
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wcursor next word
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wblock toggle
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wins saved text
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \w(RETURN) append
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wor split line
.if \n(85<\n(38 .nr 85 \n(38
.85
.rm 85
.nr 38 1n
.nr 79 0
.nr 40 \n(79+(0*\n(38)
.nr 80 +\n(40
.nr 41 \n(80+(3*\n(38)
.nr 81 +\n(41
.nr 42 \n(81+(3*\n(38)
.nr 82 +\n(42
.nr 43 \n(82+(3*\n(38)
.nr 83 +\n(43
.nr 44 \n(83+(3*\n(38)
.nr 84 +\n(44
.nr 45 \n(84+(3*\n(38)
.nr 85 +\n(45
.nr TW \n(85
.if t .if \n(TW>\n(.li .tm Table at line 33 file curlew.t is too wide - \n(TW units
.fc
.nr #T 0-1
.nr #a 0-1
.eo
.de T#
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.mk ##
.nr ## -1v
.ls 1
.ls
..
.ec
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^Q\h'|\n(41u'insert line\h'|\n(42u'^A\h'|\n(43u'align text\h'|\n(44u'^Z\h'|\n(45u'cursor line start
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^W\h'|\n(41u'char/line toggle\h'|\n(42u'^S\h'|\n(43u'insert space\h'|\n(44u'^X\h'|\n(45u'cursor text start
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^E\h'|\n(41u'delete character\h'|\n(42u'^D\h'|\n(43u'delete blanks\h'|\n(44u'^C\h'|\n(45u'cursor text end
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^R\h'|\n(41u'delete word\h'|\n(42u'^F\h'|\n(43u'previous tab\h'|\n(44u'^V\h'|\n(45u'cursor next word
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^T\h'|\n(41u'delete line start\h'|\n(42u'^G\h'|\n(43u'home cursor\h'|\n(44u'^B\h'|\n(45u'block toggle
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^Y\h'|\n(41u'delete line end\h'|\n(42u'^H\h'|\n(43u'cursor left\h'|\n(44u'^N\h'|\n(45u'ins saved text
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^U\h'|\n(41u'delete line\h'|\n(42u'^J\h'|\n(43u'cursor down\h'|\n(44u'^M\h'|\n(45u'(RETURN) append
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^I\h'|\n(41u'next tab\h'|\n(42u'^K\h'|\n(43u'cursor up\h'|\n(44u'\h'|\n(45u'or split line
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^O\h'|\n(41u'split line\h'|\n(42u'^L\h'|\n(43u'cursor right\h'|\n(44u'\h'|\n(45u'
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'^P\h'|\n(41u'combine with next\h'|\n(42u'\h'|\n(43u'\h'|\n(44u'\h'|\n(45u'
.fc
.nr T. 1
.T# 1
.35
.TE
.if \n-(b.=0 .nr c. \n(.c-\n(d.-12
.LP
Note that "^Q" means hold down "CTRL", press "Q" once and release.
.SH Line number parameters and image relocation
In full-screen operation, first press F6 (ESC then 6) to get the
command prompt. Press RETURN when the parameter is complete.
.LP
.TS
.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
.de 35
.ps \n(.s
.vs \n(.vu
.in \n(.iu
.if \n(.u .fi
.if \n(.j .ad
.if \n(.j=0 .na
..
.nf
.nr #~ 0
.if n .nr #~ 0.6n
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.fc
.nr 33 \n(.s
.rm 80 81 82
.nr 80 0
.nr 38 \wn
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w+n
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w-n
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w$
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w#
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w/pat/
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w\epat\e
.if \n(80<\n(38 .nr 80 \n(38
.80
.rm 80
.nr 81 0
.nr 38 \wLine n in the file buffer, for example:
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wn lines after the current line, example:
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wn lines before the current line, example:
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wThe last line in the file buffer.
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wThe top-of-file image line number.
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wNext line matching the pattern, example:
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wPrevious line matching pattern, example:
.if \n(81<\n(38 .nr 81 \n(38
.81
.rm 81
.nr 82 0
.nr 38 \w563
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w+60
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w-125
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w/Edinburgh/
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \w\ecity\e
.if \n(82<\n(38 .nr 82 \n(38
.82
.rm 82
.nr 38 1n
.nr 79 0
.nr 40 \n(79+(0*\n(38)
.nr 80 +\n(40
.nr 41 \n(80+(3*\n(38)
.nr 81 +\n(41
.nr 42 \n(81+(3*\n(38)
.nr 82 +\n(42
.nr TW \n(82
.if t .if \n(TW>\n(.li .tm Table at line 50 file curlew.t is too wide - \n(TW units
.fc
.nr #T 0-1
.nr #a 0-1
.eo
.de T#
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.mk ##
.nr ## -1v
.ls 1
.ls
..
.ec
.ta \n(80u \n(81u \n(82u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'n\h'|\n(41u'Line n in the file buffer, for example:\h'|\n(42u'563
. The current line (or cursor line).
.ta \n(80u \n(81u \n(82u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'+n\h'|\n(41u'n lines after the current line, example:\h'|\n(42u'+60
.ta \n(80u \n(81u \n(82u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'-n\h'|\n(41u'n lines before the current line, example:\h'|\n(42u'-125
.ta \n(80u \n(81u \n(82u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'$\h'|\n(41u'The last line in the file buffer.\h'|\n(42u'
.ta \n(80u \n(81u \n(82u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'#\h'|\n(41u'The top-of-file image line number.\h'|\n(42u'
.ta \n(80u \n(81u \n(82u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'/pat/\h'|\n(41u'Next line matching the pattern, example:\h'|\n(42u'/Edinburgh/
.ta \n(80u \n(81u \n(82u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'\epat\e\h'|\n(41u'Previous line matching pattern, example:\h'|\n(42u'\ecity\e
.fc
.nr T. 1
.T# 1
.35
.TE
.if \n-(b.=0 .nr c. \n(.c-\n(d.-10
.LP
Several line parameters may be grouped together separated by commas or
semicolons. A semicolon updates the current line pointer.
.SH Patterns
Patterns are an extension of the "Software Tools" scheme where
?=any,
%=start-of-line,
$=end-of-line,
[]=char-class,
*=closure,
@=literal,
~=case-sensitivity-toggle.
The UNIX (tm) set is available via a "set u+" command.
.LP
Examples of patterns used in searches:
.LP
.TS
.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
.de 35
.ps \n(.s
.vs \n(.vu
.in \n(.iu
.if \n(.u .fi
.if \n(.j .ad
.if \n(.j=0 .na
..
.nf
.nr #~ 0
.if n .nr #~ 0.6n
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.fc
.nr 33 \n(.s
.rm 80 81
.nr 80 0
.nr 38 \w/procedure/
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w/~joe/
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w//
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w\e\e
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w/%Name:/
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w/%$/
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w/%[0-9][0-9]*./
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w/@*@*@*/
.if \n(80<\n(38 .nr 80 \n(38
.80
.rm 80
.nr 81 0
.nr 38 \wnext line containing "procedure"
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wnext line containing "joe", "JOE", "Joe", etc.
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wnext line containing last pattern specified
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wprevious line containing last pattern
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wnext line starting with "Name:"
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wnext line with no text on it
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wnext line starting with one or more digits
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wfollowed by a period, "."
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wnext line containing three consecutive
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wasterisks ("@" overrides metacharacters)
.if \n(81<\n(38 .nr 81 \n(38
.81
.rm 81
.nr 38 4in
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 1n
.nr 79 0
.nr 40 \n(79+(0*\n(38)
.nr 80 +\n(40
.nr 41 \n(80+(3*\n(38)
.nr 81 +\n(41
.nr TW \n(81
.if t .if \n(TW>\n(.li .tm Table at line 79 file curlew.t is too wide - \n(TW units
.fc
.nr #T 0-1
.nr #a 0-1
.eo
.de T#
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.mk ##
.nr ## -1v
.ls 1
.ls
..
.ec
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'/procedure/\h'|\n(41u'next line containing "procedure"
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'/~joe/\h'|\n(41u'next line containing "joe", "JOE", "Joe", etc.
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'//\h'|\n(41u'next line containing last pattern specified
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'\e\e\h'|\n(41u'previous line containing last pattern
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'/%Name:/\h'|\n(41u'next line starting with "Name:"
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'/%$/\h'|\n(41u'next line with no text on it
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'/%[0-9][0-9]*./\h'|\n(41u'next line starting with one or more digits
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'\h'|\n(41u'followed by a period, "."
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'/@*@*@*/\h'|\n(41u'next line containing three consecutive
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'\h'|\n(41u'asterisks ("@" overrides metacharacters)
.fc
.nr T. 1
.T# 1
.35
.TE
.if \n-(b.=0 .nr c. \n(.c-\n(d.-12
.SH Full-screen operation in block mode
Block start (or end) is marked by a ^B. Move the cursor to the other
end of the block. The editing keys ^[QWERTYUOPASD], but not RETURN or
DEL, now operate on the block of text.
.LP
For the "character" operations the block is a rectangle, for "line"
operation the group of lines, for "delete word" the serial
intermediate text. ^Q and ^W save lines or a character rectangle in
block mode; to insert a copy of the text that has been saved press ^N.
Note that RETURN is "start-of-next-line" after ^B.
.SH Context editor commands
.LP
These are:
.LP
append, change, copy, delete, edit, exit, filename, format, global,
help, insert, keep, move, list, print, prompt, quit, read, set, show,
stop, substitute, undo, view, write, xglobal
.LP
Examples:
.LP
.TS
.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
.de 35
.ps \n(.s
.vs \n(.vu
.in \n(.iu
.if \n(.u .fi
.if \n(.j .ad
.if \n(.j=0 .na
..
.nf
.nr #~ 0
.if n .nr #~ 0.6n
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.fc
.nr 33 \n(.s
.rm 80 81
.nr 80 0
.nr 38 \wg/type/list
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wg/%[0-9]/list
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w1,$sub/Joe/Joseph/g
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w1,$sub/% *//
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w+,$delete
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \w1,-delete
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wg/%$/delete
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wx/%[0-9]/sub/%/\ \ \ \ \ /
.if \n(80<\n(38 .nr 80 \n(38
.80
.rm 80
.nr 81 0
.nr 38 \wlist all lines containing "type"
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wlist all lines starting with a digit
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wreplace every "Joe" by "Joseph"
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wremove all leading blanks
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete lines beyond the cursor line
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete lines before the cursor line
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wdelete all blank lines
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wfor lines not starting with a digit,
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wshift right five spaces
.if \n(81<\n(38 .nr 81 \n(38
.81
.rm 81
.nr 38 4in
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 1n
.nr 79 0
.nr 40 \n(79+(0*\n(38)
.nr 80 +\n(40
.nr 41 \n(80+(3*\n(38)
.nr 81 +\n(41
.nr TW \n(81
.if t .if \n(TW>\n(.li .tm Table at line 111 file curlew.t is too wide - \n(TW units
.fc
.nr #T 0-1
.nr #a 0-1
.eo
.de T#
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.mk ##
.nr ## -1v
.ls 1
.ls
..
.ec
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'g/type/list\h'|\n(41u'list all lines containing "type"
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'g/%[0-9]/list\h'|\n(41u'list all lines starting with a digit
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'1,$sub/Joe/Joseph/g\h'|\n(41u'replace every "Joe" by "Joseph"
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'1,$sub/% *//\h'|\n(41u'remove all leading blanks
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'+,$delete\h'|\n(41u'delete lines beyond the cursor line
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'1,-delete\h'|\n(41u'delete lines before the cursor line
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'g/%$/delete\h'|\n(41u'delete all blank lines
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'x/%[0-9]/sub/%/\ \ \ \ \ /\h'|\n(41u'for lines not starting with a digit,
.ta \n(80u \n(81u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'\h'|\n(41u'shift right five spaces
.fc
.nr T. 1
.T# 1
.35
.TE
.if \n-(b.=0 .nr c. \n(.c-\n(d.-11
.SH Function keys and their default settings
A function keystroke is signalled by pressing "ESC" once then a second
key once. The second key for each function key is:
.LP
.TS
.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
.de 35
.ps \n(.s
.vs \n(.vu
.in \n(.iu
.if \n(.u .fi
.if \n(.j .ad
.if \n(.j=0 .na
..
.nf
.nr #~ 0
.if n .nr #~ 0.6n
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.fc
.nr 33 \n(.s
.rm 80 81 82 83 84 85 86 87 88 89
.nr 80 0
.nr 38 \w1
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wF1
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wQ
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wF11
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wA
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wF21
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wZ
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \wF31
.if \n(80<\n(38 .nr 80 \n(38
.80
.rm 80
.nr 81 0
.nr 38 \w2
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wF2
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wW
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wF12
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wS
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wF22
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wX
.if \n(81<\n(38 .nr 81 \n(38
.nr 38 \wF32
.if \n(81<\n(38 .nr 81 \n(38
.81
.rm 81
.nr 82 0
.nr 38 \w3
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \wF3
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \wE
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \wF13
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \wD
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \wF23
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \wC
.if \n(82<\n(38 .nr 82 \n(38
.nr 38 \wF33
.if \n(82<\n(38 .nr 82 \n(38
.82
.rm 82
.nr 83 0
.nr 38 \w4
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wF4
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wR
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wF14
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wF
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wF24
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wV
.if \n(83<\n(38 .nr 83 \n(38
.nr 38 \wF34
.if \n(83<\n(38 .nr 83 \n(38
.83
.rm 83
.nr 84 0
.nr 38 \w5
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \wF5
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \wT
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \wF15
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \wG
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \wF25
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \wB
.if \n(84<\n(38 .nr 84 \n(38
.nr 38 \wF35
.if \n(84<\n(38 .nr 84 \n(38
.84
.rm 84
.nr 85 0
.nr 38 \w6
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wF6
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wY
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wF16
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wH
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wF26
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wN
.if \n(85<\n(38 .nr 85 \n(38
.nr 38 \wF36
.if \n(85<\n(38 .nr 85 \n(38
.85
.rm 85
.nr 86 0
.nr 38 \w7
.if \n(86<\n(38 .nr 86 \n(38
.nr 38 \wF7
.if \n(86<\n(38 .nr 86 \n(38
.nr 38 \wU
.if \n(86<\n(38 .nr 86 \n(38
.nr 38 \wF17
.if \n(86<\n(38 .nr 86 \n(38
.nr 38 \wJ
.if \n(86<\n(38 .nr 86 \n(38
.nr 38 \wF27
.if \n(86<\n(38 .nr 86 \n(38
.nr 38 \wM
.if \n(86<\n(38 .nr 86 \n(38
.nr 38 \wF37
.if \n(86<\n(38 .nr 86 \n(38
.86
.rm 86
.nr 87 0
.nr 38 \w8
.if \n(87<\n(38 .nr 87 \n(38
.nr 38 \wF8
.if \n(87<\n(38 .nr 87 \n(38
.nr 38 \wI
.if \n(87<\n(38 .nr 87 \n(38
.nr 38 \wF18
.if \n(87<\n(38 .nr 87 \n(38
.nr 38 \wK
.if \n(87<\n(38 .nr 87 \n(38
.nr 38 \wF28
.if \n(87<\n(38 .nr 87 \n(38
.87
.rm 87
.nr 88 0
.nr 38 \w9
.if \n(88<\n(38 .nr 88 \n(38
.nr 38 \wF9
.if \n(88<\n(38 .nr 88 \n(38
.nr 38 \wO
.if \n(88<\n(38 .nr 88 \n(38
.nr 38 \wF19
.if \n(88<\n(38 .nr 88 \n(38
.nr 38 \wL
.if \n(88<\n(38 .nr 88 \n(38
.nr 38 \wF29
.if \n(88<\n(38 .nr 88 \n(38
.88
.rm 88
.nr 89 0
.nr 38 \w0
.if \n(89<\n(38 .nr 89 \n(38
.nr 38 \wF10
.if \n(89<\n(38 .nr 89 \n(38
.nr 38 \wP
.if \n(89<\n(38 .nr 89 \n(38
.nr 38 \wF20
.if \n(89<\n(38 .nr 89 \n(38
.nr 38 \w;
.if \n(89<\n(38 .nr 89 \n(38
.nr 38 \wF30
.if \n(89<\n(38 .nr 89 \n(38
.89
.rm 89
.nr 38 1n
.nr 79 0
.nr 40 \n(79+(0*\n(38)
.nr 80 +\n(40
.nr 41 \n(80+(3*\n(38)
.nr 81 +\n(41
.nr 42 \n(81+(3*\n(38)
.nr 82 +\n(42
.nr 43 \n(82+(3*\n(38)
.nr 83 +\n(43
.nr 44 \n(83+(3*\n(38)
.nr 84 +\n(44
.nr 45 \n(84+(3*\n(38)
.nr 85 +\n(45
.nr 46 \n(85+(3*\n(38)
.nr 86 +\n(46
.nr 47 \n(86+(3*\n(38)
.nr 87 +\n(47
.nr 48 \n(87+(3*\n(38)
.nr 88 +\n(48
.nr 49 \n(88+(3*\n(38)
.nr 89 +\n(49
.nr TW \n(89
.if t .if \n(TW>\n(.li .tm Table at line 136 file curlew.t is too wide - \n(TW units
.fc
.nr #T 0-1
.nr #a 0-1
.eo
.de T#
.ds #d .d
.if \(ts\n(.z\(ts\(ts .ds #d nl
.mk ##
.nr ## -1v
.ls 1
.ls
..
.ec
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'1\h'|\n(41u'2\h'|\n(42u'3\h'|\n(43u'4\h'|\n(44u'5\h'|\n(45u'6\h'|\n(46u'7\h'|\n(47u'8\h'|\n(48u'9\h'|\n(49u'0
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'F1\h'|\n(41u'F2\h'|\n(42u'F3\h'|\n(43u'F4\h'|\n(44u'F5\h'|\n(45u'F6\h'|\n(46u'F7\h'|\n(47u'F8\h'|\n(48u'F9\h'|\n(49u'F10
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u'\h'|\n(43u'\h'|\n(44u'\h'|\n(45u'\h'|\n(46u'\h'|\n(47u'\h'|\n(48u'\h'|\n(49u'
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'Q\h'|\n(41u'W\h'|\n(42u'E\h'|\n(43u'R\h'|\n(44u'T\h'|\n(45u'Y\h'|\n(46u'U\h'|\n(47u'I\h'|\n(48u'O\h'|\n(49u'P
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'F11\h'|\n(41u'F12\h'|\n(42u'F13\h'|\n(43u'F14\h'|\n(44u'F15\h'|\n(45u'F16\h'|\n(46u'F17\h'|\n(47u'F18\h'|\n(48u'F19\h'|\n(49u'F20
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u'\h'|\n(43u'\h'|\n(44u'\h'|\n(45u'\h'|\n(46u'\h'|\n(47u'\h'|\n(48u'\h'|\n(49u'
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'A\h'|\n(41u'S\h'|\n(42u'D\h'|\n(43u'F\h'|\n(44u'G\h'|\n(45u'H\h'|\n(46u'J\h'|\n(47u'K\h'|\n(48u'L\h'|\n(49u';
.ta \n(80u \n(81u \n(82u \n(83u \n(84u \n(85u \n(86u \n(87u \n(88u \n(89u
.nr 31 \n(.f
.nr 35 1m
\&\h'|\n(40u'F21\h'|\n(41u'F22\h'|\n(42u'F23\h'|\n(43u'F24\h'|\n(44u'F25\h'|\n(45u'F26\h'|\n(46u'F27\h'|\n(47u'F28\h'|\n(48u'F29\h'|\n(49u'F30