Penguin
Annotated edit history of jstar(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 JOE
2 !!!JOE
3 Name
4 Syntax
5 Description
6 Usage
7 Command Line Options
8 Editing Tasks
9 Environment variables
10 Filenames
11 The joerc file
12 Acknowledgements
13 ----
14 !!Name
15
16
17 joe - Joe's Own Editor
18 !!Syntax
19
20
21 __joe [[global-options] [[ [[local-options] filename
22 ]...__
23
24
25 __jstar [[global-options] [[ [[local-options] filename
26 ]...__
27
28
29 __jmacs [[global-options] [[ [[local-options] filename
30 ]...__
31
32
33 __rjoe [[global-options] [[ [[local-options] filename
34 ]...__
35
36
37 __jpico [[global-options] [[ [[local-options] filename
38 ]...__
39 !!Description
40
41
42 JOE is a powerful ASCII-text screen editor. It has a
43
44
45 JOE also emulates several other editors. JSTAR is a close
2 perry 46 immitation of !WordStar with many
1 perry 47
48
49 Although JOE is actually five different editors, it still
50 requires only one executable, but one with five different
51 names. The name of the editor with an
52
53
54 JOE is free software; you can distribute it and/or modify it
55 under the terms of the GNU General Public License as
56 published by the Free Software Foundation. I have no plans
57 for turning JOE into a commercial or share-ware product. JOE
58 is available over the Internet by anonymous FTP from
59 __ftp.std.com__, file:
60 __src/editors/joe*.tar.Z__.
61 !!Usage
62
63
64 To start the editor, type __joe__ followed by zero or
65 more names of files you want to edit. Each file name may be
66 preceeded by a local option setting (see the local options
67 table which follows). Other global options, which apply to
68 the editor as a whole, may also be placed on the command
69 line (see the global options table which follows). If you
70 are editing a new file, you can either give the name of the
71 new file when you invoke the editor, or in the editor when
72 you save the new file. A modified syntax for file names is
73 provided to allow you to edit program output, standard
74 input/output, or sections of files or devices. See the
75 section __Filenames__ below for details.
76
77
78 Once you are in the editor, you can type in text and use
79 special control-character sequences to perform other editing
80 tasks. To find out what the control-character sequences are,
81 read the rest of this man page or type __^K H__ for help
82 in the editor.
83
84
85 Now for some obscure computer-lore:
86
87
88 The __^__ means that you hold down the __Control__ key
89 while pressing the following key (the same way the
90 __Shift__ key works for uppercase letters). A number of
91 control-key sequences are duplicated on other keys, so that
92 you don't need to press the control key: __ESC__ will
93 work in place of __^[[__, __Del__ will work in place of
94 __^?__, __Backspace__ will work in place of __^H__,
95 __Tab__ will work in place of __^I__, __Return__ or
96 __Enter__ will work in place of __^M__ and
97 __Linefeed__ will work in place of __^J__. Some
98 keyboards may give you trouble with some control keys.
99 __^___, __^^__ and __^@__ can usually be entered
100 without pressing shift (I.E., try __^-__, __^6__ and
101 __^2__). Other keyboards may reassign these to other
102 keys. Try: __^.__, __^,__ and __^/__. __^SPACE__
103 can usually be used in place of __^@__. __^\__ and
104 __^]__ are interpreted by many communication programs,
105 including telnet and kermit. Usually you just hit the key
106 twice to get it to pass through the communication
107 program.
108
109
110 Once you have typed __^K H__, the first help window
111 appears at the top of the screen. You can continue to enter
112 and edit text while the help window is on. To page through
113 other topics, hit ^[[, and ^[[. (that is, ESC , and ESC .).
114 Use __^K H__ to dismiss the help window.
115
116
117 You can customize the keyboard layout, the help screens and
118 a number of behavior defaults by copying JOE's
119 initialization file (on Debian systems
120 __/etc/joe/joerc__) to __.joerc__ in your home
121 directory and then by modifying it. See the section
122 __joerc__ below.
123
124
125 To have JOE used as your default editor for e-mail and News,
126 you need to set the __EDITOR__ and __VISUAL__
127 environment variables in your shell initialization file
128 (__.cshrc__ or __.profile__) to refer to JOE (joe
129 resides as __/usr/bin/joe__ on Debian
130 systems).
131
132
133 There are a number of other obscure invocation parameters
134 which may have to be set, particularly if your terminal
135 screen is not updating as you think it should. See the
136 section __Environment variables__ below.
137 !!Command Line Options
138
139
140 The following global options may be specified on the command
141 line:
142
143
144 -asis
145
146
147 Characters with codes above 127 will be sent to the terminal
148 as-is, instead of as inverse of the corresponding character
149 below 128. If this does not work, check your terminal
150 server.
151
152
153 -backpath path
154
155
156 If this option is given, backup files will be stored in the
157 specified directory instead of in each file's original
158 directory.
159
160
161 -baud nnn
162
163
164 Set the baud rate for the purposes of terminal screen
165 optimization. Joe inserts delays for baud rates below 19200,
166 which bypasses tty buffering so that typeahead will
167 interrupt the screen output. Scrolling commands will not be
168 used for 38400 baud. This is useful for X-terms and other
169 console ttys which really aren't going over a serial
170 line.
171
172
173 -beep
174
175
176 Joe will beep on command errors and when the cursor goes
177 past extremes.
178
179
180 -columns nnn
181
182
183 Sets the number of screen columns.
184
185
186 -csmode
187
188
189 Continued search mode: a search immediatly following a
190 search will repeat the previous search instead of prompting
191 for new string. This is useful for the the ^[[S and ^[[R
192 commands and for when joe is trying to be
193 emacs.
194
195
196 -dopadding
197
198
199 Joe usually assumes that there is some kind of flow control
200 between it and the tty. If there isn't, this option will
201 make joe output extra ^@s to the tty as specified by the
202 termcap entry. The extra ^@s allow the terminal to catch up
203 after long terminal commands.
204
205
206 -exask
207
208
209 This option makes ^KX verify the file name that it's about
210 to write.
211
212
213 -force
214
215
216 This option makes sure that the last line of the file has a
217 line-feed which it's saved.
218
219
220 -help
221
222
223 The editor will start with the help screen on if this option
224 is given.
225
226
227 -keepup
228
229
230 Normally the column number and control-key prefix fields of
231 the status lines are on a one second delay to reduce CPU
232 consumption, but with this option they are updated after
233 each key-stroke.
234
235
236 -lightoff
237
238
239 The block highlighting will go away after any block command
240 if this option is given.
241
242
243 -lines nnn
244
245
246 Sets the number of screen lines.
247
248
249 -marking
250
251
252 Text between ^KB and the cursor is highlighted (use with
253 -lightoff and a modified joerc file to have drop-anchor
254 style block selection).
255
256
257 -mid
258
259
260 If this option is set and the cursor moves off the window,
261 the window will be scrolled so that the cursor is in the
262 center. This option is forced on slow terminals which don't
263 have scrolling commands.
264
265
266 -nobackups
267
268
269 This option prevents backup files.
270
271
272 -nonotice
273
274
275 This option prevent the copyright notice from being
276 displayed when the editor starts.
277
278
279 -nosta
280
281
282 This option eliminates the top-most status line. It's nice
283 for when you only want to see your text on the screen or if
284 you're using a vt52.
285
286
287 -noxon
288
289
290 Attempt to turn off ^S/^Q processing. This is useful for
2 perry 291 when joe is trying to be !WordStar or EMACS.
1 perry 292
293
294 -orphan
295
296
297 When this option is active, extra files on the command line
298 will be placed in orphaned buffers instead of in extra
299 windows. This is useful for when joe is trying to be
300 emacs.
301
302
303 -pg nnn
304
305
2 perry 306 This specifies the number of lines to keep after !PgUp/!PgDn
1 perry 307 (^U/^V). If -1 is given, half the window is
308 kept.
309
310
311 -skiptop nnn
312
313
314 Don't use the top nnn lines of the screen. Useful for when
315 joe is used as a BBS editor.
316
317
318 Each of these options may be specified in the joerc file as
319 well. In addition, the NOXON, BAUD, LINES, COLUMNS and
320 DOPADDING options may be specified with environment
321 variables.
322
323
324 The JOETERM environment variable may be set to override the
325 regular TERM environment variable for specifying your
326 terminal type.
327
328
329 The following options may be specified before each filename
330 on the command line:
331
332
333 +nnn
334
335
336 The cursor starts on the specified line.
337
338
339 -crlf
340
341
342 Joe uses CR-LF as the end of line sequence instead of just
343 LF. This is for editing MS-DOS or VMS files.
344
345
346 -wordwrap
347
348
349 Joe wraps the previous word when you type past the right
350 margin.
351
352
353 -autoindent
354
355
356 When you hit Return on an indented line, the indentation is
357 duplicated onto the new line.
358
359
360 -overwrite
361
362
363 Typing overwrites existing characters instead of inserting
364 before them.
365
366
367 -lmargin nnn
368
369
370 Sets the left margin.
371
372
373 -rmargin nnn
374
375
376 Sets the right margin.
377
378
379 -tab nnn
380
381
382 Sets the tab width.
383
384
385 -indentc nnn
386
387
388 Sets the indentation character for ^K, and ^K. (32 for
389 SPACE, 9 for TAB).
390
391
392 -istep nnn
393
394
395 Sets the indentation step for ^K, and ^K..
396
397
398 -linums
399
400
401 Line numbers are displayed before each line.
402
403
404 -rdonly
405
406
407 The file is read only.
408
409
410 -keymap name
411
412
413 Use an alternate section of the joerc file for the key
414 sequence bindings.
415
416
417 These options can also be specified in the joerc file. They
418 can be set depending on the file-name extension. Programs
419 (.c, .h or .p extension) usually have autoindent enabled.
420 Wordwrap is enabled on other files, but rc files have it
421 disabled.
422 !!Editing Tasks
423
424
425 __Basic Editing__
426
427
428 When you type characters into the editor, they are normally
429 inserted into the file being edited (or appended to the file
430 if the cursor is at the end of the file). This is the normal
431 operating mode of the editor. If you want to replace some
432 existing text, you have to delete the old text before or
433 after you type in the replacement text. The __Backspace__
434 key can be used for deleting text: move the cursor to right
435 after the text you want to delete and hit __Backspace__ a
436 number of times.
437
438
439 Hit the __Enter__ or __Return__ key to insert a
440 line-break. For example, if the cursor was in the middle of
441 a line and you hit __Return__, the line would be split
442 into two lines with the cursor appearing at the beginning of
443 the second line. Hit __Backspace__ at the beginning of a
444 line to eliminate a line-break.
445
446
447 Use the arrow keys to move around the file. If your keyboard
448 doesn't have arrow keys (or if they don't work for some
449 reason), use __^F__ to move forwards (right), __^B__
450 to move backwards (left), __^P__ to move to the previous
451 line (up), and __^N__ to move to the next line (down).
452 The right and left arrow keys simply move forwards or
453 backwards one character at a time through the text: if
454 you're at the beginning of a line and you press left-arrow,
455 you will end up at the end of the previous line. The up and
456 down arrow keys move forwards and backwards by enough
457 characters so that the cursor appears in the same column
458 that it was in on the original line.
459
460
461 If you want to indent the text you enter, you can use the
462 __TAB__ key. This inserts a special control character
463 which makes the characters which follow it begin at the next
464 TAB STOP. TAB STOPS normally occur every 8 columns, but this
465 can be changed with the __^T D__ command. PASCAL and C
466 programmers often set TAB STOPS on every 4
467 columns.
468
469
470 If for some reason your terminal screen gets messed up (for
471 example, if you receive a mail notice from biff), you can
472 have the editor refresh the screen by hitting
473 __^R__.
474
475
476 There are many other keys for deleting text and moving
477 around the file. For example, hit __^D__ to delete the
478 character the cursor is on instead of deleting backwards
479 like __Backspace__. __^D__ will also delete a
480 line-break if the cursor is at the end of a line. Type
481 __^Y__ to delete the entire line the cursor is on or
482 __^J__ to delete just from the cursor to the end of the
483 line.
484
485
486 Hit __^A__ to move the cursor to the beginning of the
487 line it's on. Hit __^E__ to move the cursor to the end of
488 the line. Hit __^U__ or __^V__ for scrolling the
489 cursor up or down 1/2 a screen's worth.
490 __^K U__ or __^K V__ to move the
491 cursor to the beginning or the end of the file. Look at the
492 help screens in the editor to find even more delete and
493 movement commands.
494
495
496 If you make a mistake, you can hit __^___ to
497 __^-__ to get __^___, but on some you might have to
498 hold both the __Shift__ and __Control__ keys down at
499 the same time to get it. If you
500 __^^__ (type this with just __^6__ on most
501 keyboards).
502
503
504 If you were editing in one place within the file, and you
505 then temporarily had to look or edit some other place within
506 the file, you can get back to the original place by hitting
507 __^K -__. This command actually returns you to the last
508 place you made a change in the file. You can step through a
509 history of places with __^K -__ and __^K =__, in the
510 same way you can step through the history of changes with
511 the
512 __
513
514
515 When you are done editing the file, hit __^K X__ to exit
516 the editor. You will be prompted for a file name if you
517 hadn't already named the file you were editing.
518
519
520 When you edit a file, you actually edit only a copy of the
521 file. So if you decide that you don't want the changes you
522 made to a file during a particular edit session, you can hit
523 __^C__ to exit the editor without saving
524 them.
525
526
527 If you edit a file and save the changes, a
528
529
530 __Word wrap and formatting__
531
532
533 If you type past the right edge of the screen in a C
534 language or PASCAL file, the screen will scroll to the right
535 to follow the cursor. If you type past the right edge of the
536 screen in a normal file (one whose name doesn't end in .c,
537 .h or .p), JOE will automatically wrap the last word onto
538 the next line so that you don't have to hit __Return__.
539 This is called word-wrap mode. Word-wrap can be turned on or
540 off with the __^T W__ command. JOE's initialization file
541 is usually set up so that this mode is automatically turned
542 on for all non-program files. See the section below on the
543 __joerc__ file to change this and other
544 defaults.
545
546
547 Aside for Word-wrap mode, JOE does not automatically keep
548 paragraphs formatted like some word-processors. Instead, if
549 you need a paragraph to be reformatted, hit __^K J__.
550 This command
551 __
552
553
554 The margins which JOE uses for paragraph formatting and
555 word-wrap can be set with the __^T L__ and __^T R__
556 commands. If the left margin is set to a value other than 1,
557 then when you start typing at the beginning of a line, the
558 cursor will immediately jump to the left
559 margin.
560
561
562 If you want to center a line within the margins, use the
563 __^K A__ command.
564
565
566 __Over-type mode__
567
568
569 Sometimes it's tiresome to have to delete old text before or
570 after you insert new text. This happens, for example, when
571 you are changing a table and you want to maintain the column
572 position of the right side of the table. When this occurs,
573 you can put the editor in over-type mode with __^T T__.
574 When the editor is in this mode, the characters you type in
575 replace existing characters, in the way an idealized
576 typewriter would. Also, __Backspace__ simply moves left
577 instead of deleting the character to the left, when it's not
578 at the end or beginning of a line. Over-type mode is not the
579 natural way of dealing with text electronically, so you
580 should go back to insert-mode as soon as possible by typing
581 __^T T__ again.
582
583
584 If you need to insert while you're in over-type mode, hit
585 __^@__. This inserts a single SPACE into the
586 text.
587
588
589 __Control and Meta characters__
590
591
592 Each character is represented by a number. For example, the
593 number for 'A' is 65 and the number for '1' is 49. All of
594 the characters which you normally see have numbers in the
595 range of 32 - 126 (this particular arbitrary assignment
596 between characters and numbers is called the ASCII character
597 set). The numbers outside of this range, from 0 to 255,
598 aren't usually displayed, but sometimes have other special
599 meanings. The number 10, for example, is used for the
600 line-breaks. You can enter these special, non-displayed
601 __control characters__ by first hitting __`__ and then
602 hitting a character in the range __@ A B C ... X Y Z [[ ^ ]
603 \ ___ to get the number 0 - 31, and ? to get 127. For
604 example, if you hit __` J__, you'll insert a line-break
605 character, or if you hit __` I__, you'll insert a TAB
606 character (which does the same thing the TAB key does). A
607 useful control character to enter is 12 (__` L__), which
608 causes most printers to advance to the top of the page.
609 You'll notice that JOE displays this character as an
610 underlined L. You can enter the characters above 127, the
611 __meta characters__, by first hitting __^\__. This
612 adds 128 to the next (possibly control) character entered.
613 JOE displays characters above 128 in inverse-video. Some
614 foreign languages, which have more letters than English, use
615 the meta characters for the rest of their alphabet. You have
616 to put the editor in __ASIS__ mode (described later) to
617 have these passed untranslated to the terminal.
618
619
620 __Prompts__
621
622
623 If you hit __TAB__ at any file name prompt, joe will
624 attempt to complete the name you entered as much as
625 possible. If it couldn't complete the entire name, because
626 there are more than one possible completions, joe beeps. If
627 you hit __TAB__ again, joe list the completions. You can
628 use the arrow keys to move around this directory menu and
629 press RETURN or SPACE to select an item. If you press the
630 first letter of one of the directory entries, it will be
631 selected, or if more than one entry has the same first
632 letter, the cursor will jump between those entries. If you
633 select a subdirectory or .., the directory name is appended
634 to the prompt and the new directory is loaded into the menu.
635 You can hit Backspace to go back to the previous
636 directory.
637
638
639 Most prompts record a history of the responses you give
640 them. You can hit up and down arrow to step through these
641 histories.
642
643
644 Prompts are actually single line windows with no status
645 line, so you can use any editing command that you normally
646 use on text within the prompts. The prompt history is
647 actually just other lines of the same
648 ^K F__ command if you
649 want.
650
651
652 Since prompts are windows, you can also switch out of them
653 with __^K P__ and __^K N__.
654
655
656 __Where am I?__
657
658
659 Hit __^K SPACE__ to have JOE report the line number,
660 column number, and byte number on the last line of the
661 screen. The number associated with the character the cursor
662 is on (its ASCII code) is also shown. You can have the line
663 number and/or column number always displayed on the status
664 line by setting placing the appropriate escape sequences in
665 the status line setup strings. Edit the joerc file for
666 details.
667
668
669 __File operations__
670
671
672 You can hit __^K D__ to save the current file (possibly
673 under a different name from what the file was called
674 originally). After the file is saved, you can hit __^K
675 E__ to edit a different file.
676
677
678 If you want to save only a selected section of the file, see
679 the section on __Blocks__ below.
680
681
682 If you want to include another file in the file you're
683 editing, use __^K R__ to insert it.
684
685
686 __Temporarily suspending the editor__
687
688
689 If you need to temporarily stop the editor and go back to
690 the shell, hit __^K Z__. You might want to do this to
691 stop whatever you're editing and answer an e-mail message or
692 read this man page, for example. You have to type __fg__
693 or __exit__ (you'll be told which when you hit __^K
694 Z__) to return to the editor.
695
696
697 __Searching for text__
698
699
700 Hit __^K F__ to have the editor search forwards or
701 backwards for a text fragment (__string__) for you. You
702 will be prompted for the text to search for. After you hit
703 __Return__, you are prompted to enter options. You can
704 just hit __Return__ again to have the editor immediately
705 search forwards for the text, or you can enter one or more
706 of these options:
707
708
709 __b__
710
711
712 Search backwards instead of forwards.
713
714
715 __i__
716
717
718 Treat uppercase and lower case letters as the same when
719 searching. Normally uppercase and lowercase letters are
720 considered to be different.
721
722
723 __nnn__
724
725
726 (where __nnn__ is a number) If you enter a number, JOE
727 searches for the Nth occurrence of the text. This is useful
728 for going to specific places in files structured in some
729 regular manner.
730
731
732 __r__
733
734
735 Replace text. If you enter the __r__ option, then you
736 will be further prompted for replacement text. Each time the
737 editor finds the search text, you will be prompted as to
738 whether you want to replace the found search text with the
739 replacement text. You hit: __y__ to replace the text and
740 then find the next occurrence, __n__ to not replace this
741 text, but to then find the next occurrence, __r__ to
742 replace all of the remaining occurrences of the search text
743 in the remainder of the file without asking for confirmation
744 (subject to the __nnn__ option above), or __^C__ to
745 stop searching and replacing.
746
747
748 You can hit __^L__ to repeat the previous
749 search.
750
751
752 __Regular Expressions__
753
754
755 A number of special character sequences may be entered as
756 search text:
757
758
759 __*__
760
761
762 This finds zero or more characters. For example, if you give
763 __A*B__ as the search text, JOE will try to find an A
764 followed by any number of characters and then a
765 B.
766
767
768 __?__
769
770
771 This finds exactly one character. For example, if you give
772 __A?B__ as the search text, JOE will find AXB, but not AB
773 or AXXB.
774
775
776 __^ $__
777
778
779 These match the beginning and end of a line. For example, if
780 you give __^test$__, then JOE with find __test__ on a
781 line by itself.
782
783
784 ____
785
786
787 These match the beginning and end of a word. For example, if
788 you give ____, then joe will find whole words
789 which have the sub-string __is__ within
790 them.
791
792
793 __[[...]__
794
795
796 This matches any single character which appears within the
797 brackets. For example, if __[[Tt]his__ is entered as the
798 search string, then JOE finds both __This__ and
799 __this__. Ranges of characters can be entered within the
800 brackets. For example, __[[A-Z]__ finds any uppercase
801 letter. If the first character given in the brackets is
802 __^__, then JOE tries to find any character not given in
803 the the brackets.
804
805
806 __c__
807
808
809 This works like __*__, but matches a balanced C-language
810 expression. For example, if you search for __malloc(c)__,
811 then JOE will find all function calls to __malloc__, even
812 if there was a __)__ within the parenthesis.
813
814
815 __+__
816
817
818 This finds zero or more of the character which immediately
819 follows the __+__. For example, if you give __[[ ]+[[
820 ]__, where the characters within the brackets are both
821 SPACE and TAB, then JOE will find whitespace.
822
823
824 __\__
825
826
827 Matches a single .
828
829
830 __n__
831
832
833 This finds the special end-of-line or line-break
834 character.
835
836
837 A number of special character sequences may also be given in
838 the replacement string:
839
840
841 ____
842
843
844 This gets replaced by the text which matched the search
845 string. For example, if the search string was
846 ____, which matches words, and you give
847 ____, then joe will put quote marks
848 around words.
849
850
851 __0 - 9__
852
853
854 These get replaced with the text which matched the Nth
855 __*__, __?__, __+__, __c__, __+__, or
856 __[[...]__ in the search string.
857
858
859 __\__
860
861
862 Use this if you need to put a __\__ in the replacement
863 string.
864
865
866 __n__
867
868
869 Use this if you need to put a line-break in the replacement
870 string.
871
872
873 Some examples:
874
875
876 Suppose you have a list of addresses, each on a separate
877 line, which starts with
878
879
880 Address: S. Holmes, 221b Baker St., London,
881 England
882
883
884 If you wanted to rearrange the list, to get the country
885 first, then the city, then the person's name, and then the
886 address, you could do this:
887
888
889 Type __^K F__ to start the search, and type:
890
891
892 __Address:*,*,*,*$__
893
894
895 to match
896 r__ to replace the string, and
897 then type:
898
899
900 __Address:3,2,0,1__
901
902
903 To shuffle the information the way you want it. After
904 hitting return, the search would begin, and the sample line
905 would be changed to:
906
907
908 Address: England, London, S. Holmes, 221b Baker
909 St.
910
911
912 __Blocks__
913
914
915 If you want to move, copy, save or delete a specific section
916 of text, you can do it with highlighted blocks. First, move
917 the cursor to the start of the section of text you want to
918 work on, and press __^K B__. Then move the cursor to the
919 character just after the end of the text you want to affect
920 and press __^K K__. The text between the __^K B__ and
921 __^K K__ should become highlighted. Now you can move your
922 cursor to someplace else in your document and press __^K
923 M__ to move the highlighted text there. You can press
924 __^K C__ to make a copy of the highlighted text and
925 insert it to where the cursor is positioned. __^K Y__ to
926 deletes the highlighted text. __^K W__, writes the
927 highlighted text to a file.
928
929
930 A very useful command is __^K /__, which filters a block
931 of text through a unix command. For example, if you select a
932 list of words with __^K B__ and __^K K__, and then
933 type __^K / sort__, the list of words will be sorted.
934 Another useful unix command for __^K /__, is __tr__.
935 If you type __^K / tr a-z A-Z__, then all of the letters
936 in the highlighted block will be converted to
937 uppercase.
938
939
940 After you are finished with some block operations, you can
941 just leave the highlighting on if you don't mind it (of
942 course, if you accidently hit __^K Y__ without
943 noticing...). If it really bothers you, however, just hit
944 __^K B ^K K__, to turn the highlighting off.
945
946
947 __Indenting program blocks__
948
949
950 Auto-indent mode toggled with the __^T I__ command. The
951 __joerc__ is normally set up so that files with names
952 ending with .p, .c or .h have auto-indent mode enabled. When
953 auto-indent mode is enabled and you hit __Return__, the
954 cursor will be placed in the same column that the first
955 non-SPACE/TAB character was in on the original
956 line.
957
958
959 You can use the __^K ,__ and __^K .__ commands to
960 shift a block of text to the left or right. If no
961 highlighting is set when you give these commands, the
962 program block the cursor is located in will be selected, and
963 will be moved by subsequent __^K ,__ and __^K .__
964 commands. The number of columns these commands shift by can
965 be set through a __^T__ option.
966
967
968 __Windows__
969
970
971 You can edit more than one file at the same time or edit two
972 or more different places of the same file. To do this, hit
973 __^K O__, to split the screen into two windows. Use __^K
974 P__ or __^K N__ to move the cursor into the top window
975 or the lower window. Use __^K E__ to edit a new file in
976 one of the windows. A window will go away when you save the
977 file with __^K X__ or abort the file with __^C__. If
978 you abort a file which exists in two windows, one of the
979 window goes away, not the file.
980
981
982 You can hit __^K O__ within a window to create even more
983 windows. If you have too many windows on the screen, but you
984 don't want to eliminate them, you can hit __^K I__. This
985 will show only the window the cursor is in, or if there was
986 only one window on the screen to begin with, try to fit all
987 hidden windows on the screen. If there are more windows than
988 can fit on the screen, you can hit __^K N__ on the
989 bottom-most window or __^K P__ on the top-most window to
990 get to them.
991
992
993 If you gave more than one file name to JOE on the command
994 line, each file will be placed in a different
995 window.
996
997
998 You can change the height of the windows with the __^K
999 G__ and __^K T__ commands.
1000
1001
1002 __Keyboard macros__
1003
1004
1005 Macros allow you to record a series of keystrokes and replay
1006 them with the press of two keys. This is useful to automate
1007 repetitive tasks. To start a macro recording, hit __^K
1008 [[__ followed by a number from 0 to 9. The status line will
1009 display (Macro n recording...). Now, type in the series of
1010 keystrokes that you want to be able to repeat. The commands
1011 you type will have their usual effect. Hit __^K ]__ to
1012 stop recording the macro. Hit __^K__ followed by the
1013 number you recorded the macro in to execute one iteration of
1014 the key-strokes.
1015
1016
1017 For example, if you want to put
1018
1019
1020 __^K [[ ^A **__ __^K
1021 ]__
1022
1023
1024 Which starts the macro recording, moves the cursor to the
1025 beginning of the line, inserts
1026
1027
1028 If you find that the macro you are recording itself has a
1029 repeated set of key-strokes in it, you can record a macro
1030 within the macro, as long as you use a different macro
1031 number. Also you can execute previously recorded macros from
1032 within new macros.
1033
1034
1035 __Repeat__
1036
1037
1038 You can use the repeat command, __^K \__, to repeat a
1039 macro, or any other edit command or even a normal character,
1040 a specified number of times. Hit __^K \__, type in the
1041 number of times you want the command repeated and press
1042 __Return__. The next edit command you now give will be
1043 repeated that many times.
1044
1045
1046 For example, to delete the next 20 lines of text,
1047 type:
1048
1049
1050 __^K 20____^Y__
1051
1052
1053 __Rectangle mode__
1054
1055
1056 Type __^T X__ to have __^K B__ and __^K K__ select
1057 rectangular blocks instead of stream-of-text blocks. This
1058 mode is useful for moving, copying, deleting or saving
1059 columns of text. You can also filter columns of text with
1060 the __^K /__ command- if you want to sort a column, for
1061 example. The insert file command, __^K R__ is also
1062 effected.
1063
1064
1065 When rectangle mode is selected, over-type mode is also
1066 useful (__^T T__). When over-type mode is selected,
1067 rectangles will replace existing text instead of getting
1068 inserted before it. Also the delete block command (__^K
1069 Y__) will clear the selected rectangle with SPACEs and
1070 TABs instead of deleting it. Over-type mode is especially
1071 useful for the filter block command (__^K /__), since it
1072 will maintain the original width of the selected
1073 column.
1074
1075
1076 __Tag search__
1077
1078
1079 If you are editing a large C program with many source files,
1080 you can use the __ctags__ program to generate a
1081 __tags__ file. This file contains a list of program
1082 symbols and the files and positions where the symbols are
1083 defined. The __^K ;__ command can be used to lookup a
1084 symbol (functions, defined constants, etc.), load the file
1085 where the symbol is defined into the current window and
1086 position the cursor to where the symbol is defined. __^K
1087 ;__ prompts you for the symbol you want, but uses the
1088 symbol the cursor was on as a default. Since __^K ;__
1089 loads the definition file into the current window, you
1090 probably want to split the window first with __^K O__, to
1091 have both the original file and the definition file
1092 loaded.
1093
1094
1095 __Shell windows__
1096
1097
1098 Hit __^K '__ to run a command shell in one of JOE's
1099 windows. When the cursor is at the end of a shell window
1100 (use __^K V__ if it's not), whatever you type is passed
1101 to the shell instead of the window. Any output from the
1102 shell or from commands executed in the shell is appended to
1103 the shell window (the cursor will follow this output if it's
1104 at the end of the shell window). This command is useful for
1105 recording the results of shell commands- for example the
1106 output of __make__, the result of __grep__ping a set
1107 of files for a string, or directory listings from __FTP__
1108 sessions. Besides typeable characters, the keys ^C,
1109 Backspace, DEL, Return and ^D are passed to the shell. Type
1110 the shell __exit__ command to stop recording shell
1111 output. If you press __^C__ in a shell window, when the
1112 cursor is not at the end of the window, the shell is
1113 __kill__ed.
1114 !!Environment variables
1115
1116
1117 For JOE to operate correctly, a number of other environment
1118 settings must be correct. The throughput (baud rate) of the
1119 connection between the computer and your terminal must be
1120 set correctly for JOE to update the screen smoothly and
1121 allow typeahead to defer the screen update. Use the __stty
1122 nnn__ command to set this. You want to set it as close as
1123 possible to actual throughput of the connection. For
1124 example, if you are connected via a 1200 baud modem, you
1125 want to use this value for __stty__. If you are connected
1126 via 14.4k modem, but the terminal server you are connected
1127 to connects to the computer a 9600 baud, you want to set
1128 your speed as 9600 baud. The special baud rate of 38400 or
1129 __extb__ is used to indicate that you have a very-high
1130 speed connection, such as a memory mapped console or an
1131 X-window terminal emulator. If you can't use __stty__ to
1132 set the actual throughput (perhaps because of a modem
1133 communicating with the computer at a different rate than
1134 it's communicating over the phone line), you can put a
1135 numeric value in the __BAUD__ environment variable
1136 instead (use __setenv BAUD 9600__ for csh or
1137 __BAUD=9600; export BAUD__ for sh).
1138
1139
1140 The __TERM__ environment variable must be set to the type
1141 of terminal you're using. If the size (number of
1142 lines/columns) of your terminal is different from what is
1143 reported in the TERMCAP or TERMINFO entry, you can set this
1144 with the __stty rows nn cols nn__ command, or by setting
1145 the __LINES__ and __COLUMNS__ environment
1146 variables.
1147
1148
1149 JOE normally expects that flow control between the computer
1150 and your terminal to use ^S/^Q handshaking (I.E., if the
1151 computer is sending characters too fast for your terminal,
1152 your terminal sends ^S to stop the output and ^Q to restart
1153 it). If the flow control uses out-of-band or hardware
1154 handshaking or if your terminal is fast enough to always
1155 keep up with the computer output and you wish to map ^S/^Q
1156 to edit commands, you can set the environment variable
1157 __NOXON__ to have JOE attempt to turn off ^S/^Q
1158 handshaking. If the connection between the computer and your
1159 terminal uses no handshaking and your terminal is not fast
1160 enough to keep up with the output of the computer, you can
1161 set the environment variable __DOPADDING__ to have
1162 __JOE__ slow down the output by interspersing PAD
1163 characters between the terminal screen update
1164 sequences.
1165 !!Filenames
1166
1167
1168 Wherever JOE expects you to enter a file name, whether on
1169 the command line or in prompts within the editor, you may
1170 also type:
1171
1172
1173 __!command__
1174
1175
1176 Read or write data to or from a shell command. For example,
1177 use __joe '!ls'__ to get a copy of your directory listing
1178 to edit or from within the editor use __^K D !mail
1179 jhallen@world.std.com__ to send the file being edited to
1180 me.
1181
1182
1183 ____
1184
1185
1186 Use this to have JOE append the edited text to the end of
1187 the file
1188
1189
1190 __filename,START,SIZE__
1191
1192
1193 Use this to access a fixed section of a file or device.
1194 __START__ and __SIZE__ may be entered in decimal (ex.:
1195 123) octal (ex.: 0777) or hexadecimal (ex.: 0xFF). For
1196 example, use __joe /dev/fd0,508,2__ to edit bytes 508 and
1197 509 of the first floppy drive in Linux.
1198
1199
1200 __-__
1201
1202
1203 Use this to get input from the standard input or to write
1204 output to the standard output. For example, you can put joe
1205 in a pipe of commands: __quota -v | joe - | mail root__,
1206 if you want to complain about your low quota.
1207 !!The joerc file
1208
1209
1210 __^T__ options, the help screens and the key-sequence to
1211 editor command bindings are all defined in JOE's
1212 initialization file. If you make a copy of this file (which
1213 resides in __/etc/joe/joerc__) to __$HOME/.joerc__,
1214 you can customize these setting to your liking. The syntax
1215 of the initialization file should be fairly obvious and
1216 there are further instruction in it.
1217 !!Acknowledgements
1218
1219
1220 JOE was writen by Joseph H. Allen. If you have bug reports
1221 or questions, e-mail them to jhallen@world.std.com. Larry
1222 Foard (entropy@world.std.com) and Gary Gray
1223 (ggray@world.std.com) also helped with the creation of
1224 JOE.
1225 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.