Debian Codegraph @

upstream/debian-unstable/man1/joe.1

raw
1 .\" generated with Ronn/v0.7.3
2 .\" http://github.com/rtomayko/ronn/tree/0.7.3
3 .
4 .TH "JOE" "" "March 2016" "" ""
5 .
6 .SH "NAME"
7 \fBJOE\fR \- Joe\'s Own Editor
8 .
9 .SH "Syntax"
10 \fBjoe [global\-options] [ [local\-options] filename ]\.\.\.\fR
11 .
12 .br
13 \fBjstar [global\-options] [ [local\-options] filename ]\.\.\.\fR
14 .
15 .br
16 \fBjmacs [global\-options] [ [local\-options] filename ]\.\.\.\fR
17 .
18 .br
19 \fBrjoe [global\-options] [ [local\-options] filename ]\.\.\.\fR
20 .
21 .br
22 \fBjpico [global\-options] [ [local\-options] filename ]\.\.\.\fR
23 .
24 .SH "Description"
25 JOE is a powerful console screen editor\. It has a "mode\-less" user interface which is similar to many user\-friendly PC editors\. Users of Micro\-Pro\'s WordStar or Borland\'s "Turbo" languages will feel at home\. JOE is a full featured UNIX screen\-editor though, and has many features for editing programs and text\.
26 .
27 .P
28 JOE also emulates several other editors\. JSTAR is a close imitation of WordStar with many "JOE" extensions\. JPICO is a close imitation of the Pine mailing system\'s PICO editor, but with many extensions and improvements\. JMACS is a GNU\-EMACS imitation\. RJOE is a restricted version of JOE, which allows you to edit only the files specified on the command line\.
29 .
30 .P
31 Although JOE is actually five different editors, it still requires only one executable, but one with five different names\. The name of the editor with an "rc" appended gives the name of JOE\'s initialization file, which determines the personality of the editor\.
32 .
33 .P
34 JOE is free software; you can distribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation\. JOE is available over the Internet from \fIhttp://www\.sourceforge\.net/projects/joe\-editor\fR\.
35 .
36 .SH "Usage"
37 To start the editor, type \fBjoe\fR followed by zero or more names of files you want to edit\. Each file name may be preceded by a local option setting (see the local options table which follows)\. Other global options, which apply to the editor as a whole, may also be placed on the command line (see the global options table which follows)\. If you are editing a new file, you can either give the name of the new file when you invoke the editor, or in the editor when you save the new file\. A modified syntax for file names is provided to allow you to edit program output, standard input/output, or sections of files or devices\. See the section \fIFilenames\fR below for details\.
38 .
39 .P
40 Once you are in the editor, you can type in text and use special control\-character sequences to perform other editing tasks\. To find out what the control\-character sequences are, read the rest of this man page or type \fB^K H\fR for help in the editor\.
41 .
42 .P
43 Now for some obscure computer\-lore:
44 .
45 .P
46 The \fB^\fR means that you hold down the \fBControl\fR key while pressing the following key (the same way the \fBShift\fR key works for uppercase letters)\. A number of control\-key sequences are duplicated on other keys, so that you don\'t need to press the control key: \fBEsc\fR will work in place of \fB^[\fR, \fBDel\fR will work in place of \fB^?\fR, \fBBackspace\fR will work in place of \fB^H\fR, \fBTab\fR will work in place of \fB^I\fR, \fBReturn\fR or \fBEnter\fR will work in place of \fB^M\fR and \fBLinefeed\fR will work in place of \fB^J\fR\. Some keyboards may give you trouble with some control keys\. \fB^\fR_, \fB^^\fR and \fB^@\fR can usually be entered without pressing shift (i\.e\., try \fB^\-\fR, \fB^6\fR and \fB^2\fR)\. Other keyboards may reassign these to other keys\. Try: \fB^\.\fR, \fB^,\fR and \fB^/\fR\. \fB^Space\fR can usually be used in place of \fB^@\fR\. \fB^\e\fR and \fB^]\fR are interpreted by many communication programs, including telnet and kermit\. Usually you just hit the key twice to get it to pass through the communication program\.
47 .
48 .P
49 On some keyboards, holding the \fBAlt\fR key down while pressing another key is the same as typing \fBEsc\fR before typing the other key\.
50 .
51 .P
52 Once you have typed \fB^K H\fR, the first help window appears at the top of the screen\. You can continue to enter and edit text while the help window is on\. To page through other topics, hit \fBEsc ,\fR and \fBEsc \.\fR (that is, \fBEsc ,\fR and \fBEsc \.\fR)\. Use \fB^K H\fR to dismiss the help window\.
53 .
54 .P
55 You can customize the keyboard layout, the help screens and a number of behavior defaults by copying JOE\'s initialization file (usually \fB/etc/joe/joerc\fR) to \fB\.joerc\fR in your home directory and then by modifying it\. See the section \fIjoerc\fR below\.
56 .
57 .P
58 To have JOE used as your default editor for e\-mail and News, you need to set the \fBEDITOR\fR and \fBVISUAL\fR environment variables in your shell initialization file (\fB\.cshrc\fR or \fB\.profile\fR) to refer to JOE (JOE usually resides as \fB/usr/bin/joe\fR)\.
59 .
60 .P
61 There are a number of other obscure invocation parameters which may have to be set, particularly if your terminal screen is not updating as you think it should\. See the section \fIEnvironment variables\fR below\.
62 .
63 .P
64 \fI\fR
65 .
66 .SH "Command Line Options"
67 These options can also be specified in the joerc file\. Local options can be set depending on the file\-name extension\. Programs (\.c, \.h or \.p extension) usually have autoindent enabled\. Wordwrap is enabled on other files, but rc files have it disabled\.
68 .
69 .P
70 An option is enabled when it\'s given like this:
71 .
72 .IP "" 4
73 .
74 .nf
75
76 \-wordwrap
77 .
78 .fi
79 .
80 .IP "" 0
81 .
82 .P
83 An option is disabled when it\'s given like this:
84 .
85 .IP "" 4
86 .
87 .nf
88
89 \-\-wordwrap
90 .
91 .fi
92 .
93 .IP "" 0
94 .
95 .P
96 Some options take arguments\. Arguments are given like this:
97 .
98 .IP "" 4
99 .
100 .nf
101
102 \-lmargin 5
103 .
104 .fi
105 .
106 .IP "" 0
107 .
108 .P
109 The following global options may be specified on the command line:
110 .
111 .IP "\(bu" 4
112 asis
113 .
114 .br
115 Characters with codes above 127 will be sent to the terminal as\-is, instead of as inverse of the corresponding character below 128\. If this does not work, check your terminal server\. This option has no effect if UTF\-8 encoding is used\.
116 .
117 .br
118
119 .
120 .IP "\(bu" 4
121 assume_256color
122 .
123 .br
124 Assume ANSI\-like terminal emulator supports 256 colors even if termcap entry says it doesn\'t\.
125 .
126 .br
127
128 .
129 .IP "\(bu" 4
130 assume_color
131 .
132 .br
133 Assume ANSI\-like terminal emulator supports color even if termcap entry says it doesn\'t\.
134 .
135 .br
136
137 .
138 .IP "\(bu" 4
139 text_color \fBcolor\fR
140 .
141 .br
142 Set color for text\.
143 .
144 .br
145
146 .
147 .IP "\(bu" 4
148 status_color \fBcolor\fR
149 .
150 .br
151 Set color for status bar\.
152 .
153 .br
154
155 .
156 .IP "\(bu" 4
157 help_color \fBcolor\fR
158 .
159 .br
160 Set color for help\.
161 .
162 .br
163
164 .
165 .IP "\(bu" 4
166 menu_color \fBcolor\fR
167 .
168 .br
169 Set color for menus\.
170 .
171 .br
172
173 .
174 .IP "\(bu" 4
175 prompt_color \fBcolor\fR
176 .
177 .br
178 Set color for prompts\.
179 .
180 .br
181
182 .
183 .IP "\(bu" 4
184 msg_color \fBcolor\fR
185 .
186 .br
187 Set color for messages\.
188 .
189 .br
190
191 .
192 .IP "\(bu" 4
193 autoswap
194 .
195 .br
196 Automatically swap \fB^K B\fR with \fB^K K\fR if necessary to mark a legal block during block copy/move commands\.
197 .
198 .br
199
200 .
201 .IP "\(bu" 4
202 backpath path
203 .
204 .br
205 Sets path to a directory where all backup files are to be stored\. If this is unset (the default) backup files are stored in the directory containing the file\.
206 .
207 .br
208
209 .
210 .IP "\(bu" 4
211 baud nnn
212 .
213 .br
214 Set the baud rate for the purposes of terminal screen optimization (overrides value reported by stty)\. JOE inserts delays for baud rates below 19200, which bypasses tty buffering so that typeahead will interrupt the screen output\. Scrolling commands will not be used for 38400 baud and above\. This is useful for X\-terms and other console ttys which really aren\'t going over a serial line\.
215 .
216 .br
217
218 .
219 .IP "\(bu" 4
220 beep
221 .
222 .br
223 Enable beeps when edit commands return errors, for example when the cursor goes past extremes\.
224 .
225 .br
226
227 .
228 .IP "\(bu" 4
229 break_links
230 .
231 .br
232 When enabled, JOE first deletes the file before writing it in order to break hard\-links and symbolic\-links\.
233 .
234 .br
235
236 .
237 .IP "\(bu" 4
238 break_hardlinks
239 .
240 .br
241 When enabled, and the file is not a symbolic links, JOE first deletes the file before writing it in order to break hard\-links\.
242 .
243 .br
244
245 .
246 .IP "\(bu" 4
247 brpaste
248 .
249 .br
250 When JOE starts, send command to the terminal emulator that enables "bracketed paste mode" (but only if the terminal seems to have the ANSI command set)\. In this mode, text pasted into the window is bracketed with ESC [ 2 0 0 ~ and ESC [ 2 0 1 ~\.
251 .
252 .br
253
254 .
255 .IP "\(bu" 4
256 columns nnn
257 .
258 .br
259 Set number of columns in terminal emulator (in case termcap entry is wrong)\. This is only useful on old system which don\'t have the "get window size" ioctl\.
260 .
261 .br
262
263 .
264 .IP "\(bu" 4
265 csmode
266 .
267 .br
268 Enable continued search mode: Successive \fB^K F\fRs repeat the current search instead of prompting for a new one\.
269 .
270 .br
271
272 .
273 .IP "\(bu" 4
274 dopadding
275 .
276 .br
277 Enable JOE to send padding NULs to the terminal (for very old terminals)\.
278 .
279 .br
280
281 .
282 .IP "\(bu" 4
283 exask
284 .
285 .br
286 When set, \fB^K X\fR prompts for a new name before saving the file\.
287 .
288 .br
289
290 .
291 .IP "\(bu" 4
292 floatmouse
293 .
294 .br
295 When set, mouse clicks can position the cursor beyond the ends of lines\.
296 .
297 .br
298
299 .
300 .IP "\(bu" 4
301 guess_crlf
302 .
303 .br
304 When set, JOE tries to guess the file format MS\-DOS or UNIX\.
305 .
306 .br
307
308 .
309 .IP "\(bu" 4
310 guess_indent
311 .
312 .br
313 When set, JOE tries to guess the indentation character and indentation step based on the contents of the file\. The algorithm is to find the greatest common factor of the three most common indentations found in the file\.
314 .
315 .br
316
317 .
318 .IP "\(bu" 4
319 guess_non_utf8
320 .
321 .br
322 When set, enable guessing of non\-UTF\-8 files in UTF\-8 locales\.
323 .
324 .br
325
326 .
327 .IP "\(bu" 4
328 guess_utf8
329 .
330 .br
331 When set, enable guessing of UTF\-8 files in non\-UTF\-8 locales\.
332 .
333 .br
334
335 .
336 .IP "\(bu" 4
337 guess_utf16
338 .
339 .br
340 When set, enable guessing of UTF\-16 files\. If a UTF\-16BE or UTF\-16LE file is detected, it is converted to UTF\-8 during load, and converted back to UTF\-16 during save\.
341 .
342 .br
343
344 .
345 .IP "\(bu" 4
346 helpon
347 .
348 .br
349 When set, start off with the on\-line help enabled\.
350 .
351 .br
352
353 .
354 .IP "\(bu" 4
355 help_is_utf8
356 .
357 .br
358 When set, the help text in the joerc file is assumed to be UTF\-8\.
359 .
360 .br
361
362 .
363 .IP "\(bu" 4
364 icase
365 .
366 .br
367 Search is case insensitive by default when set\.
368 .
369 .br
370
371 .
372 .IP "\(bu" 4
373 joe_state
374 .
375 .br
376 Enable reading and writing of ~/\.joe_state file
377 .
378 .br
379
380 .
381 .IP "\(bu" 4
382 joexterm
383 .
384 .br
385 Set this if xterm was configured with \-\-paste64 option for better mouse support\.
386 .
387 .br
388
389 .
390 .IP "\(bu" 4
391 keepup
392 .
393 .br
394 The column number on the status line is updated constantly when this is set, otherwise it is updated only once a second\.
395 .
396 .br
397
398 .
399 .IP "\(bu" 4
400 language \fBlanguage\fR
401 .
402 .br
403 Sets language for aspell\.
404 .
405 .br
406
407 .
408 .IP "\(bu" 4
409 lightoff
410 .
411 .br
412 Automatically turn off \fB^K B\fR \fB^K K\fR highlighting after a block operation\.
413 .
414 .br
415
416 .
417 .IP "\(bu" 4
418 lines nnn
419 .
420 .br
421 Set number of lines in terminal emulator (in case termcap entry is wrong)\. This is only useful on old system which don\'t have the "get window size" ioctl\.
422 .
423 .br
424
425 .
426 .IP "\(bu" 4
427 marking
428 .
429 .br
430 Enable marking mode: highlights between \fB^K B\fR and cursor\.
431 .
432 .br
433
434 .
435 .IP "\(bu" 4
436 menu_above
437 .
438 .br
439 Put menus above prompt instead of below them\.
440 .
441 .br
442
443 .
444 .IP "\(bu" 4
445 menu_explorer
446 .
447 .br
448 Stay in menu when a directory is selected (otherwise the directory is added to the path and the cursor jumps back to the prompt)\.
449 .
450 .br
451
452 .
453 .IP "\(bu" 4
454 menu_jump
455 .
456 .br
457 Jump into the file selection menu when \fBTab\fR \fBTab\fR is hit\.
458 .
459 .br
460
461 .
462 .IP "\(bu" 4
463 mid
464 .
465 .br
466 If this option is set and the cursor moves off the window, the window will be scrolled so that the cursor is in the center\. This option is forced on slow terminals which don\'t have scrolling commands\.
467 .
468 .br
469
470 .
471 .IP "\(bu" 4
472 left nn
473 .
474 .br
475 This sets the number of columns the screen scrolls to the left when cursor moves past the left edge or when the crawll command is issued\. If nn is negative, then it\'s the fraction of the screen to scroll\. For example, \-2 means scroll 1/2 the screen\.
476 .
477 .br
478
479 .
480 .IP "\(bu" 4
481 right nn
482 .
483 .br
484 This sets the number of columns the screen scrolls to the right when cursor moves past the right edge or when the crawlr command is issued\. If nn is negative, then it\'s the fraction of the screen to scroll\. For example, \-3 means scroll 1/3 the screen\.
485 .
486 .br
487
488 .
489 .IP "\(bu" 4
490 mouse
491 .
492 .br
493 Enable xterm mouse support\.
494 .
495 .br
496
497 .
498 .IP "\(bu" 4
499 nobackups
500 .
501 .br
502 Disable backup files\.
503 .
504 .br
505
506 .
507 .IP "\(bu" 4
508 nocurdir
509 .
510 .br
511 Disable current\-directory prefix in prompts\.
512 .
513 .br
514
515 .
516 .IP "\(bu" 4
517 noexmsg
518 .
519 .br
520 Disable exiting message ("File not changed so no update needed")
521 .
522 .br
523
524 .
525 .IP "\(bu" 4
526 nolinefeeds
527 .
528 .br
529 Disable sending linefeeds to preserve screen history in terminal emulator\'s scroll\-back buffer (only relevant when notite mode is enabled)\.
530 .
531 .br
532 .
533 .br
534
535 .
536 .IP "\(bu" 4
537 nolocks
538 .
539 .br
540 Disable EMACS compatible file locks\.
541 .
542 .br
543
544 .
545 .IP "\(bu" 4
546 nomodcheck
547 .
548 .br
549 Disable periodic file modification check\.
550 .
551 .br
552
553 .
554 .IP "\(bu" 4
555 nonotice
556 .
557 .br
558 This option prevents the copyright notice from being displayed when the editor starts\.
559 .
560 .br
561
562 .
563 .IP "\(bu" 4
564 nosta
565 .
566 .br
567 This option eliminates the top\-most status line\. It\'s nice for when you only want to see your text on the screen or if you\'re using a vt52\.
568 .
569 .br
570
571 .
572 .IP "\(bu" 4
573 notagsmenu
574 .
575 .br
576 Disable selection menu for tags search with multiple results\.
577 .
578 .br
579
580 .
581 .IP "\(bu" 4
582 notite
583 .
584 .br
585 Disable ti and te termcap sequences which are usually set up to save and restore the terminal screen contents when JOE starts and exits\.
586 .
587 .br
588
589 .
590 .IP "\(bu" 4
591 pastehack
592 .
593 .br
594 If keyboard input comes in as one block assume it\'s a mouse paste and disable autoindent and wordwrap\.
595 .
596 .br
597
598 .
599 .IP "\(bu" 4
600 noxon
601 .
602 .br
603 Disable \fB^S\fR and \fB^Q\fR flow control, possibly allowing \fB^S\fR and \fB^Q\fR to be used as editor keys\.
604 .
605 .br
606
607 .
608 .IP "\(bu" 4
609 orphan
610 .
611 .br
612 Orphan extra files given on the command line instead of creating windows for them (the files are loaded, but you need to use switch\-buffer commands to access them)\.
613 .
614 .br
615
616 .
617 .IP "\(bu" 4
618 pg nnn
619 .
620 .br
621 Set number of lines to keep during Page Up and Page Down (use \-1 for 1/2 window size)\.
622 .
623 .br
624
625 .
626 .IP "\(bu" 4
627 regex
628 .
629 .br
630 Use standard regular expression syntax by default, instead of the JOE syntax (where special characters have their meaning only when preceded with backslash)\.
631 .
632 .br
633
634 .
635 .IP "\(bu" 4
636 restore
637 .
638 .br
639 Set to have cursor positions restored to last positions of previously edited files\.
640 .
641 .br
642
643 .
644 .IP "\(bu" 4
645 rtbutton
646 .
647 .br
648 Swap left and right mouse buttons\.
649 .
650 .br
651
652 .
653 .IP "\(bu" 4
654 search_prompting
655 .
656 .br
657 Show previous search string in search command (like in PICO)\.
658 .
659 .br
660
661 .
662 .IP "\(bu" 4
663 skiptop nnn
664 .
665 .br
666 When set to N, the first N lines of the terminal screen are not used by JOE and are instead left with their original contents\. This is useful for programs which call JOE to leave a message for the user\.
667 .
668 .br
669
670 .
671 .IP "\(bu" 4
672 square
673 .
674 .br
675 Enable rectangular block mode\.
676 .
677 .br
678
679 .
680 .IP "\(bu" 4
681 transpose
682 .
683 .br
684 Transpose rows with columns in all menus\.
685 .
686 .br
687
688 .IP "\(bu" 4
689 title
690 .
691 .br
692 Display context (titles) in status line. When enabled this shows the first line of the function that the cursor is in on the status line\. The syntax file context.jsf identifies which lines are title lines\.
693 .
694 .br
695
696 .
697 .IP "\(bu" 4
698 type
699 .
700 .br
701 Select file type, overriding the automatically determined type\. The file types are defined in the \fBftyperc\fR file\.
702 .
703 .br
704
705 .
706 .IP "\(bu" 4
707 undo_keep nnn
708 .
709 .br
710 Sets number of undo records to keep (0 means infinite)\.
711 .
712 .br
713
714 .
715 .IP "\(bu" 4
716 usetabs
717 .
718 .br
719 Set to allow rectangular block operations to use tabs\.
720 .
721 .br
722
723 .
724 .IP "\(bu" 4
725 wrap
726 .
727 .br
728 Enable search to wrap to beginning of file\.
729 .
730 .br
731
732 .
733 .IP "" 0
734 .
735 .P
736 The following local options may be specified on the command line:
737 .
738 .IP "\(bu" 4
739 +nnn
740 .
741 .br
742 The cursor starts on the specified line\.
743 .
744 .br
745
746 .
747 .IP "\(bu" 4
748 autoindent
749 .
750 .br
751 Enable auto\-indent mode\. When you hit \fBEnter\fR on an indented line, the indentation is duplicated onto the new line\.
752 .
753 .br
754
755 .
756 .IP "\(bu" 4
757 c_comment
758 .
759 .br
760 Enable \fB^G\fR skipping of C\-style comments /\fI\.\.\.\fR/
761 .
762 .br
763
764 .
765 .IP "\(bu" 4
766 cpara \fBcharacters\fR
767 .
768 .br
769 Sets list of characters which can indent paragraphs\.
770 .
771 .br
772
773 .
774 .IP "\(bu" 4
775 cnotpara \fBcharacters\fR
776 .
777 .br
778 Sets list of characters which begin lines which are definitely not part of paragraphs\.
779 .
780 .br
781
782 .
783 .IP "\(bu" 4
784 cpp_comment
785 .
786 .br
787 Enable \fB^G\fR skipping of C++\-style comments // \.\.\.
788 .
789 .br
790
791 .
792 .IP "\(bu" 4
793 crlf
794 .
795 .br
796 JOE uses CR\-LF as the end of line sequence instead of just LF\. This is for editing MS\-DOS or VMS files\.
797 .
798 .br
799
800 .
801 .IP "\(bu" 4
802 encoding \fBencoding\fR
803 .
804 .br
805 Set file encoding (like utf\-8 or 8859\-1)\.
806 .
807 .br
808
809 .
810 .IP "\(bu" 4
811 flowed
812 .
813 .br
814 Set to force an extra space after each line of a paragraph but the last\.
815 .
816 .br
817
818 .
819 .IP "\(bu" 4
820 force
821 .
822 .br
823 When set, a final newline is appended to the file if there isn\'t one when the file is saved\.
824 .
825 .br
826
827 .
828 .IP "\(bu" 4
829 french
830 .
831 .br
832 When set, only one space is inserted after periods in paragraph reformats instead of two\.
833 .
834 .br
835
836 .
837 .IP "\(bu" 4
838 hex
839 .
840 .br
841 Enable hex\-dump mode\.
842 .
843 .br
844
845 .
846 .IP "\(bu" 4
847 highlight
848 .
849 .br
850 Enable syntax highlighting\.
851 .
852 .br
853
854 .
855 .IP "\(bu" 4
856 highlighter_context
857 .
858 .br
859 Enable use of syntax file to identify comments and strings which should be skipped over during \fB^G\fR matching\.
860 .
861 .br
862
863 .
864 .IP "\(bu" 4
865 indentc nnn
866 .
867 .br
868 Sets the indentation character for shift left and shift right (\fB^K ,\fR and \fB^K \.\fR)\. Use 32 for \fBSpace\fR, 9 for \fBTab\fR\.
869 .
870 .br
871
872 .
873 .IP "\(bu" 4
874 indentfirst
875 .
876 .br
877 When set, the smart home key jumps to the indentation point first, otherwise it jumps to column 1 first\.
878 .
879 .br
880
881 .
882 .IP "\(bu" 4
883 istep nnn
884 .
885 .br
886 Sets indentation step\.
887 .
888 .br
889
890 .
891 .IP "\(bu" 4
892 linums
893 .
894 .br
895 Enable line number display\.
896 .
897 .br
898
899 .
900 .IP "\(bu" 4
901 lmargin
902 .
903 .br
904 Set left margin\.
905 .
906 .br
907
908 .
909 .IP "\(bu" 4
910 lmsg
911 .
912 .br
913 Define left\-side status bar message\.
914 .
915 .br
916
917 .
918 .IP "\(bu" 4
919 overwrite
920 .
921 .br
922 Enable overtype mode\. Typing overwrites existing characters instead of inserting before them\.
923 .
924 .br
925
926 .
927 .IP "\(bu" 4
928 picture
929 .
930 .br
931 Enable "picture" mode\- allows cursor to go past ends of lines\.
932 .
933 .br
934
935 .
936 .IP "\(bu" 4
937 pound_comment
938 .
939 .br
940 \fB^G\fR ignores # \.\.\. comments\.
941 .
942 .br
943
944 .
945 .IP "\(bu" 4
946 purify
947 .
948 .br
949 Fix indentation if necessary before shifting or smart backspace\. For example, if indentation uses a mix of tabs and spaces, and indentc is space, then indentation will be converted to all spaces before the shifting operation\.
950 .
951 .br
952
953 .
954 .IP "\(bu" 4
955 rdonly
956 .
957 .br
958 Set read\-only mode\.
959 .
960 .br
961
962 .
963 .IP "\(bu" 4
964 rmargin nnn
965 .
966 .br
967 Set right margin\.
968 .
969 .br
970
971 .
972 .IP "\(bu" 4
973 rmsg \fBstring\fR
974 .
975 .br
976 Define right\-side status bar message\.
977 .
978 .br
979
980 .
981 .IP "\(bu" 4
982 semi_comment
983 .
984 .br
985 \fB^G\fR ignores ; \.\.\. comments\.
986 .
987 .br
988
989 .
990 .IP "\(bu" 4
991 single_quoted
992 .
993 .br
994 \fB^G\fR ignores \'\.\.\.\'
995 .
996 .br
997
998 .
999 .IP "\(bu" 4
1000 smartbacks
1001 .
1002 .br
1003 Enable smart backspace and tab\. When this mode is set backspace and tab indent or unindent based on the values of the istep and indentc options\.
1004 .
1005 .br
1006
1007 .
1008 .IP "\(bu" 4
1009 smarthome
1010 .
1011 .br
1012 Home key first moves cursor to beginning of line, then if hit again, to the first non\-blank character\.
1013 .
1014 .br
1015
1016 .
1017 .IP "\(bu" 4
1018 smsg \fBstring\fR
1019 .
1020 .br
1021 Define status command format when cursor is on a character\.
1022 .
1023 .br
1024
1025 .
1026 .IP "\(bu" 4
1027 spaces
1028 .
1029 .br
1030 Insert spaces when \fBTab\fR key is hit\.
1031 .
1032 .br
1033
1034 .
1035 .IP "\(bu" 4
1036 syntax \fBsyntax\fR
1037 .
1038 .br
1039 Set syntax for syntax highlighting\.
1040 .
1041 .br
1042
1043 .
1044 .IP "\(bu" 4
1045 tab nnn
1046 .
1047 .br
1048 Set tab stop width\.
1049 .
1050 .br
1051
1052 .
1053 .IP "\(bu" 4
1054 text_delimiters \fBword delimiter list\fR
1055 .
1056 .br
1057 Give list of word delimiters which \fB^G\fR will step through\.
1058 .
1059 .IP "" 0
1060 .
1061 .P
1062 For example, "begin=end:if=elif=else=endif" means that \fB^G\fR will jump between the matching if, elif, else and endif\.
1063 .
1064 .IP "\(bu" 4
1065 vhdl_comment
1066 .
1067 .br
1068 \fB^G\fR ignores \-\- \.\.\. comments
1069 .
1070 .br
1071
1072 .
1073 .IP "\(bu" 4
1074 wordwrap
1075 .
1076 .br
1077 JOE wraps the previous word when you type past the right margin\.
1078 .
1079 .br
1080
1081 .
1082 .IP "\(bu" 4
1083 zmsg \fBstring\fR
1084 .
1085 .br
1086 Define status command format when cursor is at end of file\.
1087 .
1088 .br
1089
1090 .
1091 .IP "\(bu" 4
1092 xmsg \fBstring\fR
1093 .
1094 .br
1095 Define startup message (usually the copyright notice)\.
1096 .
1097 .br
1098
1099 .
1100 .IP "\(bu" 4
1101 aborthint \fBstring\fR
1102 .
1103 .br
1104 Give the key sequence to show in prompts for abort (usually ^C)\.
1105 .
1106 .br
1107
1108 .
1109 .IP "\(bu" 4
1110 helphint \fBstring\fR
1111 .
1112 .br
1113 Give the key sequence to show in prompts for help (usually ^K H)\.
1114 .
1115 .br
1116
1117 .
1118 .IP "" 0
1119 .
1120 .SS "Colors and attributes"
1121 Combine attributes and up to one foreground color and one background color to create arguments for color options like text_color\. For example: bold+bg_green+blue
1122 .
1123 .IP "\(bu" 4
1124 Attributes: bold, inverse, blink, dim, underline, and italic
1125 .
1126 .IP "\(bu" 4
1127 Foreground colors: white, cyan, magenta, blue, yellow, green, red, or black
1128 .
1129 .IP "\(bu" 4
1130 Background colors: bg_white, bg_cyan, bg_magenta, bg_blue, bg_yellow, bg_green, bg_red or bg_black
1131 .
1132 .IP "" 0
1133 .
1134 .P
1135 With a 16 color or 256 color terminal emulator (export TERM=xterm\-16color), these brighter than normal colors become available:
1136 .
1137 .IP "\(bu" 4
1138 Foreground: WHITE, CYAN, MAGENTA, BLUE, YELLOW, GREEN, RED or BLACK
1139 .
1140 .IP "\(bu" 4
1141 Background: bg_WHITE, bg_CYAN, bg_MAGENTA, bg_BLUE, bg_YELLOW, bg_GREEN, bg_RED or bg_BLACK
1142 .
1143 .IP "" 0
1144 .
1145 .P
1146 With a 256 color terminal emulator (export TERM=xterm\-256color), these become available:
1147 .
1148 .IP "\(bu" 4
1149 fg_RGB and bg_RGB, where R, G and B rand from 0 \- 5\. So: fg_500 is bright red\.
1150 .
1151 .IP "\(bu" 4
1152 fg_NN and bg_NN give shades of grey, where the intensity, NN, ranges from 0 \- 23\.
1153 .
1154 .IP "" 0
1155 .
1156 .SS "Status line definition strings"
1157 \-lmsg defines the left\-justified string and \-rmsg defines the right\-justified string\. The first character of \-rmsg is the background fill character\.
1158 .
1159 .P
1160 \-smsg defines the status command (\fB^K Space\fR)\. \-zmsg defines it when the cursor is at the end of the file\. The last character of smsg or zmsg is the fill character\.
1161 .
1162 .P
1163 The following escape sequences can be used in these strings:
1164 .
1165 .IP "" 4
1166 .
1167 .nf
1168
1169 %t 12 hour time
1170 %u 24 hour time
1171 %T O for overtype mode, I for insert mode
1172 %W W if wordwrap is enabled
1173 %I A if autoindent is enabled
1174 %X Rectangle mode indicator
1175 %n File name
1176 %m \'(Modified)\' if file has been changed
1177 %* \'*\' if file has been changed
1178 %R Read\-only indicator
1179 %r Row (line) number
1180 %c Column number
1181 %o Byte offset into file
1182 %O Byte offset into file in hex
1183 %a Ascii value of character under cursor
1184 %A Ascii value of character under cursor in hex
1185 %w Width of character under cursor
1186 %p Percent of file cursor is at
1187 %l No\. lines in file
1188 %k Entered prefix keys
1189 %S \'*SHELL*\' if there is a shell running in window
1190 %M Macro recording message
1191 %y Syntax
1192 %e Encoding
1193 %x Context (first non\-indented line going backwards)
1194 %dd day
1195 %dm month
1196 %dY year
1197 %Ename% value of environment variable
1198 %Tname% value of option (ON or OFF for Boolean options)
1199 .
1200 .fi
1201 .
1202 .IP "" 0
1203 .
1204 .P
1205 These formatting escape sequences may also be given:
1206 .
1207 .IP "" 4
1208 .
1209 .nf
1210
1211 \ei Inverse
1212 \eu Underline
1213 \eb Bold
1214 \ed Dim
1215 \ef Blink
1216 \el Italic
1217 .
1218 .fi
1219 .
1220 .IP "" 0
1221 .
1222 .P
1223 .
1224 .br
1225 .
1226 .SH "Basic Editing"
1227 When you type characters into the editor, they are normally inserted into the file being edited (or appended to the file if the cursor is at the end of the file)\. This is the normal operating mode of the editor\. If you want to replace some existing text, you have to delete the old text before or after you type in the replacement text\. The \fBBackspace\fR key can be used for deleting text: move the cursor to right after the text you want to delete and hit \fBBackspace\fR a number of times\.
1228 .
1229 .P
1230 Hit the \fBEnter\fR or \fBReturn\fR key to insert a line\-break\. For example, if the cursor was in the middle of a line and you hit \fBEnter\fR, the line would be split into two lines with the cursor appearing at the beginning of the second line\. Hit \fBBackspace\fR at the beginning of a line to eliminate a line\-break\.
1231 .
1232 .P
1233 Use the arrow keys to move around the file\. If your keyboard doesn\'t have arrow keys (or if they don\'t work for some reason), use \fB^F\fR to move forwards (right), \fB^B\fR to move backwards (left), \fB^P\fR to move to the previous line (up), and \fB^N\fR to move to the next line (down)\. The right and left arrow keys simply move forwards or backwards one character at a time through the text: if you\'re at the beginning of a line and you press left\-arrow, you will end up at the end of the previous line\. The up and down arrow keys move forwards and backwards by enough characters so that the cursor appears in the same column that it was in on the original line\.
1234 .
1235 .P
1236 If you want to indent the text you enter, you can use the \fBTab\fR key\. This inserts a special control character which makes the characters which follow it begin at the next tab stop\. Tab stops normally occur every 8 columns, but this can be changed with the \fB^T D\fR command\. PASCAL and C programmers often set tab stops on every 4 columns\.
1237 .
1238 .P
1239 If for some reason your terminal screen gets messed up (for example, if you receive a mail notice from biff), you can have the editor refresh the screen by hitting \fB^R\fR\.
1240 .
1241 .P
1242 There are many other keys for deleting text and moving around the file\. For example, hit \fB^D\fR to delete the character the cursor is on instead of deleting backwards like \fBBackspace\fR\. \fB^D\fR will also delete a line\-break if the cursor is at the end of a line\. Type \fB^Y\fR to delete the entire line the cursor is on or \fB^J\fR to delete just from the cursor to the end of the line\.
1243 .
1244 .P
1245 Hit \fB^A\fR to move the cursor to the beginning of the line it\'s on\. Hit \fB^E\fR to move the cursor to the end of the line\. Hit \fB^U\fR or \fB^V\fR for scrolling the cursor up or down 1/2 a screen\'s worth\.
1246 .
1247 .br
1248 "Scrolling" means that the text on the screen moves, but the cursor stays at the same place relative to the screen\. Hit \fB^K U\fR or \fB^K V\fR to move the cursor to the beginning or the end of the file\. Look at the help screens in the editor to find even more delete and movement commands\.
1249 .
1250 .P
1251 If you make a mistake, you can hit \fB^_\fR to "undo" it\. On most keyboards you hit just \fB^\-\fR to get \fB^_\fR, but on some you might have to hold both the \fBShift\fR and \fBControl\fR keys down at the same time to get it\. If you "undo" too much, you can "redo" the changes back into existence by hitting \fB^^\fR (type this with just \fB^6\fR on most keyboards)\.
1252 .
1253 .SS "Cursor position history"
1254 If you were editing in one place within the file, and you then temporarily had to look or edit some other place within the file, you can get back to the original place by hitting \fB^K \-\fR\. This command actually returns you to the last place you made a change in the file\. You can step through a history of places with \fB^K \-\fR and \fB^K =\fR, in the same way you can step through the history of changes with the "undo" and "redo" commands\.
1255 .
1256 .SS "Save and exit"
1257 When you are done editing the file, hit \fB^K X\fR to exit the editor\. You will be prompted for a file name if you hadn\'t already named the file you were editing\.
1258 .
1259 .P
1260 When you edit a file, you actually edit only a copy of the file\. So if you decide that you don\'t want the changes you made to a file during a particular edit session, you can hit \fB^C\fR to exit the editor without saving them\.
1261 .
1262 .P
1263 If you edit a file and save the changes, a backup copy of that file is created in the current directory, with a \fB~\fR appended to the name, which contains the original version of the file\.
1264 .
1265 .SS "File operations"
1266 You can hit \fB^K D\fR to save the current file (possibly under a different name from what the file was called originally)\. After the file is saved, you can hit \fB^K E\fR to edit a different file\.
1267 .
1268 .P
1269 If you want to save only a selected section of the file, see the section on \fIBlocks\fR below\.
1270 .
1271 .P
1272 If you want to include another file in the file you\'re editing, use \fB^K R\fR to insert it\.
1273 .
1274 .P
1275 \fI\fR
1276 .
1277 .SS "Filenames"
1278 Wherever JOE expects you to enter a file name, whether on the command line or in prompts within the editor, you may also type:
1279 .
1280 .IP "\(bu" 4
1281 !command
1282 .
1283 .IP "" 0
1284 .
1285 .P
1286 To read or write data to or from a shell command\. For example, use \fBjoe \'!ls\'\fR to get a copy of your directory listing to edit or from within the editor use \fB^K D !mail jhallen@world\.std\.com\fR to send the file being edited to me\.
1287 .
1288 .IP "\(bu" 4
1289 >>filename
1290 .
1291 .IP "" 0
1292 .
1293 .P
1294 Use this to have JOE append the edited text to the end of the file "filename\."
1295 .
1296 .IP "\(bu" 4
1297 filename,START,SIZE
1298 .
1299 .IP "" 0
1300 .
1301 .P
1302 Use this to access a fixed section of a file or device\. \fBSTART\fR and \fBSIZE\fR may be entered in decimal (ex\.: 123) octal (ex\.: 0777) or hexadecimal (ex\.: 0xFF)\. For example, use \fBjoe /dev/fd0,508,2\fR to edit bytes 508 and 509 of the first floppy drive in Linux\.
1303 .
1304 .IP "\(bu" 4
1305 \-
1306 .
1307 .IP "" 0
1308 .
1309 .P
1310 Use this to get input from the standard input or to write output to the standard output\. For example, you can put JOE in a pipe of commands: \fBquota \-v | joe | mail root\fR, if you want to complain about your low quota\.
1311 .
1312 .SS "Using JOE in a shell script"
1313 JOE used to use /dev/tty to access the terminal\. This caused a problem with idle\-session killers (they would kill JOE because the real tty device was not being accessed for a long time), so now JOE only uses /dev/tty if you need to pipe a file into JOE, as in:
1314 .
1315 .IP "" 4
1316 .
1317 .nf
1318
1319 echo "hi" | joe
1320 .
1321 .fi
1322 .
1323 .IP "" 0
1324 .
1325 .P
1326 If you want to use JOE in a shell script which has its stdin/stdout redirected, but you do not need to pipe to it, you should simply redirect JOE\'s stdin/stdout to /dev/tty:
1327 .
1328 .IP "" 4
1329 .
1330 .nf
1331
1332 joe filename </dev/tty >/dev/tty
1333 .
1334 .fi
1335 .
1336 .IP "" 0
1337 .
1338 .P
1339 .
1340 .br
1341 .
1342 .br
1343 .
1344 .SS "Word wrap and formatting"
1345 If you type past the right edge of the screen in a C or PASCAL language file, the screen will scroll to the right to follow the cursor\. If you type past the right edge of the screen in a normal file (one whose name doesn\'t end in \.c, \.h or \.p), JOE will automatically wrap the last word onto the next line so that you don\'t have to hit \fBEnter\fR\. This is called word\-wrap mode\. Word\-wrap can be turned on or off with the \fB^T W\fR command\. JOE\'s initialization file is usually set up so that this mode is automatically turned on for all non\-program files\. See the section below on the \fIjoerc\fR file to change this and other defaults\.
1346 .
1347 .P
1348 Aside for Word\-wrap mode, JOE does not automatically keep paragraphs formatted like some word\-processors\. Instead, if you need a paragraph to be reformatted, hit \fB^K J\fR\. This command "fills in" the paragraph that the cursor is in, fitting as many words in a line as is possible\. A paragraph, in this case, is a block of text separated above and below by a blank line\.
1349 .
1350 .P
1351 The margins which JOE uses for paragraph formatting and word\-wrap can be set with the \fB^T L\fR and \fB^T R\fR commands\. If the left margin is set to a value other than 1, then when you start typing at the beginning of a line, the cursor will immediately jump to the left margin\.
1352 .
1353 .P
1354 There are a number of options which control the paragraph reformatter and word wrapper:
1355 .
1356 .IP "\(bu" 4
1357 The \fBcpara\fR option provides a list of characters which can indent a paragraph\. For example, in e\-mail quoted matter is indicated by \fB>\fR at the beginnings of line, so this character should be in the cpara list\.
1358 .
1359 .IP "\(bu" 4
1360 The \fBcnotpara\fR option provides a list of characters which, if they are the first non\-whitespace character of a line, indicate that the line is not to be included as part of a paragraph for formatting\. For example, lines beginning with \'\.\' in nroff can not be paragraph lines\.
1361 .
1362 .IP "\(bu" 4
1363 Autoindent mode affects the formatter\. If autoindent is disabled, only the first line will be indented\. If autoindent is enabled, the entire paragraph is indented\.
1364 .
1365 .IP "\(bu" 4
1366 \fBfrench\fR determines how many spaces are inserted after periods\.
1367 .
1368 .IP "\(bu" 4
1369 When \fBflowed\fR is enabled, a space is inserted after each but the last line of the paragraph\. This indicates that the lines belong together as a single paragraph in some programs\.
1370 .
1371 .IP "\(bu" 4
1372 When \fBovertype\fR is enabled, the word wrapper will not insert lines\.
1373 .
1374 .IP "" 0
1375 .
1376 .SS "Centering"
1377 If you want to center a line within the margins, use the \fB^K A\fR command\.
1378 .
1379 .SS "Spell checker"
1380 Hit \fBEsc N\fR to check the spelling of the word the cursor is on using the aspell program (or ispell program if you modify the joerc file)\. Hit \fBEsc L\fR to check the highlighted block or the entire file if no block is highlighted\.
1381 .
1382 .P
1383 JOE passes the language and character encoding to the spell checker\. To change the language, hit \fB^T V\fR\. For example, use en_US for English\.
1384 .
1385 .SS "Overtype mode"
1386 Sometimes it\'s tiresome to have to delete old text before or after you insert new text\. This happens, for example, when you are changing a table and you want to maintain the column position of the right side of the table\.
1387 .
1388 .br
1389 When this occurs, you can put the editor in overtype mode with \fB^T T\fR\.
1390 .
1391 .br
1392 When the editor is in this mode, the characters you type in replace existing characters, in the way an idealized typewriter would\. Also, \fBBackspace\fR simply moves left instead of deleting the character to the left, when it\'s not at the end or beginning of a line\. Overtype mode is not the natural way of dealing with text electronically, so you should go back to insert\-mode as soon as possible by typing \fB^T T\fR again\.
1393 .
1394 .P
1395 If you need to insert while you\'re in overtype mode, hit \fB^@\fR\. This inserts a single \fBSpace\fR into the text\.
1396 .
1397 .SS "Control and Meta characters"
1398 Each character is represented by a number\. For example, the number for \'A\' is 65 and the number for \'1\' is 49\. All of the characters which you normally see have numbers in the range of 32 \- 126 (this particular arbitrary assignment between characters and numbers is called the ASCII character set)\. The numbers outside of this range, from 0 to 255, aren\'t usually displayed, but sometimes have other special meanings\. The number 10, for example, is used for the line\-breaks\. You can enter these special, non\-displayed \fBcontrol characters\fR by first hitting \fB^Q\fR and then hitting a character in the range \fB@ A B C \.\.\. X Y Z [ ^ ] \e _\fR to get the number 0 \- 31, and ? to get 127\. For example, if you hit \fB^Q J\fR, you\'ll insert a line\-break character, or if you hit \fB^Q I\fR, you\'ll insert a \fBTab\fR character (which does the same thing the \fBTab\fR key does)\. A useful control character to enter is 12 (\fB^Q L\fR), which causes most printers to advance to the top of the page\. You\'ll notice that JOE displays this character as an underlined L\. You can enter the characters above 127, the \fBmeta characters\fR, by first hitting \fB^\e\fR\. This adds 128 to the next (possibly control) character entered\. JOE displays characters above 128 in inverse\-video\. Some foreign languages, which have more letters than English, use the meta characters for the rest of their alphabet\. You have to put the editor in \fBasis\fR mode to have these passed untranslated to the terminal\.
1399 .
1400 .P
1401 \fBNote:\fR JOE now normally passes all 8\-bits to the terminal unless the locale is set to C or POSIX\. If the locale is C or POSIX, then the \fBasis\fR flag determines if \fBmeta characters\fR are shown in inverse video or passed directly to the terminal\.
1402 .
1403 .P
1404 \fBNote:\fR In older version of JOE, you had to use \fBEsc \'\fR to enter control characters\.
1405 .
1406 .SH "Character sets and UTF\-8"
1407 JOE natively handles two classes of character sets: UTF\-8 and byte coded (like ISO\-8859\-1)\. For these character sets, the file is loaded as\-is into memory, and is exactly preserved during save, even if it contains UTF\-8 coding errors\.
1408 .
1409 .P
1410 It can not yet natively handle other major classes such as UTF\-16 or GB2312\. There are other restrictions: character sets must use LF (0x0A) or CR\-LF (0x0D \- 0x0A) as line terminators, space must be 0x20 and tab must be 0x09\. Basically, the files must be UNIX or MS\-DOS compatible text files\.
1411 .
1412 .P
1413 This means EBCDIC will not work properly (but you would need to handle fixed record length lines anyway) and character sets which use CR terminated lines (MACs) will not yet work\.
1414 .
1415 .P
1416 JOE now supports UTF\-16 (both big endian and little endian)\. It supports UTF\-16 by converting to UTF\-8 during load, and converting back to UTF\-16 during save\.
1417 .
1418 .P
1419 The terminal and the file can have different encodings\. JOE will translate between the two\. Currently, one of the two must be UTF\-8 for translation to work\.
1420 .
1421 .P
1422 The character set for the terminal and the default character set assumed for files is determined by the \'LC_ALL\' environment variable (and if that\'s not set, LC_CTYPE and LANG are also checked)\.
1423 .
1424 .P
1425 For example, if LC_ALL is set to:
1426 .
1427 .IP "" 4
1428 .
1429 .nf
1430
1431 de_DE
1432 .
1433 .fi
1434 .
1435 .IP "" 0
1436 .
1437 .P
1438 Then the character set will be ISO\-8859\-1\.
1439 .
1440 .P
1441 If LC_ALL is set to:
1442 .
1443 .IP "" 4
1444 .
1445 .nf
1446
1447 de_DE\.UTF\-8
1448 .
1449 .fi
1450 .
1451 .IP "" 0
1452 .
1453 .P
1454 The character set will be UTF\-8\.
1455 .
1456 .P
1457 Hit \fB^T E\fR to change the coding for the file\. Hit \fBTab\fR \fBTab\fR at this prompt to get a list of available codings\. There are a number of built\-in character sets, plus you can install character sets in the ~/\.joe/charmaps and /usr/share/joe/charmaps directories\.
1458 .
1459 .P
1460 Check: /usr/share/i18n/charmaps for example character set files\. Only byte oriented character sets will work\. Also, the file should not be gzipped (all of the charmap files in /usr/share/i18n/charmaps on my computer were compressed)\. The parser is very bad, so basically the file has to look exactly like the example one in /usr/share/joe/charmaps\.
1461 .
1462 .P
1463 You can hit \fB^K Space\fR to see the current character set\.
1464 .
1465 .P
1466 You can hit \fB^Q x\fR to enter a Unicode character if the file coding is UTF\-8\.
1467 .
1468 .SH "Prompts"
1469 Most prompts record a history of the responses you give them\. You can hit up and down arrow to step through these histories\.
1470 .
1471 .P
1472 Prompts are actually single line windows with no status line, so you can use any editing command that you normally use on text within the prompts\. The prompt history is actually just other lines of the same "prompt file"\. Thus you can can search backwards though the prompt history with the normal \fB^K F\fR command if you want\.
1473 .
1474 .P
1475 Since prompts are windows, you can also switch out of them with \fB^K P\fR and \fB^K N\fR\.
1476 .
1477 .SS "Completion and selection menus"
1478 You can hit \fBTab\fR in just about any prompt to request JOE to complete the word you are typing\. If JOE beeps, there are either no completions or many\. As with the "bash" shell, hit \fBTab\fR twice to bring up a list of all the possibilities\. This list is actually a menu, but by default, the cursor does not jump into it since it is usually easier to just type in your selection\. You can, however, jump into the menu window with \fB^K P\fR (move to previous window) and use the arrow keys and <Enter> to make your selection\. Also in a menu, you can hit the first letter of any of the items to make the cursor jump directly to it\. The \fB^T\fR option menu works like this\.
1479 .
1480 .P
1481 If the menu is too large to fit in the window, you can hit Page Up and Page Down to scroll it (even if you have not jumped into it)\.
1482 .
1483 .P
1484 \fBTab\fR completion works in the search and replace prompts as well\. In this case, JOE tries to complete the word based on the contents of the buffer\. If you need search for the \fBTab\fR character itself, you can enter it with \fB^Q Tab\fR\.
1485 .
1486 .P
1487 Also, you can hit \fBEsc Enter\fR in a text window to request JOE to complete the word you are typing\. As with the search prompt, JOE tries to complete the word based on the contents of the buffer\. It will bring up a menu of possibilities if you hit \fBEsc Enter\fR twice\.
1488 .
1489 .SH "Where am I?"
1490 Hit \fB^K Space\fR to have JOE report the line number, column number, and byte number on the last line of the screen\. The number associated with the character the cursor is on (its ASCII code) is also shown\. You can have the line number and/or column number always displayed on the status line by placing the appropriate escape sequences in the status line setup strings\. Edit the joerc file for details\.
1491 .
1492 .SH "What if I hit <strong>^K</strong> by accident?"
1493 Hit the space bar\. This runs an innocuous command (it shows the line number on the status bar)\.
1494 .
1495 .SH "Temporarily suspending the editor"
1496 If you need to temporarily stop the editor and go back to the shell, hit \fB^K Z\fR\. You might want to do this to stop whatever you\'re editing and answer an e\-mail message or read this man page, for example\. You have to type \fBfg\fR or \fBexit\fR (you\'ll be told which when you hit \fB^K Z\fR) to return to the editor\.
1497 .
1498 .SH "Searching for text"
1499 Hit \fB^K F\fR to have the editor search forwards or backwards for a text fragment (\fBstring\fR) for you\. You will be prompted for the text to search for\. After you hit \fBEnter\fR, you are prompted to enter options\.
1500 .
1501 .br
1502 You can just hit \fBEnter\fR again to have the editor immediately search forwards for the text, or you can enter one or more of these options:
1503 .
1504 .IP "\(bu" 4
1505 \fBb\fR
1506 .
1507 .br
1508
1509 .
1510 .IP "" 0
1511 .
1512 .P
1513 Search backwards instead of forwards\.
1514 .
1515 .IP "\(bu" 4
1516 \fBi\fR
1517 .
1518 .br
1519
1520 .
1521 .IP "" 0
1522 .
1523 .P
1524 Treat uppercase and lower case letters as the same when searching\. Normally uppercase and lowercase letters are considered to be different\.
1525 .
1526 .IP "\(bu" 4
1527 \fBnnn\fR
1528 .
1529 .br
1530
1531 .
1532 .IP "" 0
1533 .
1534 .P
1535 (where \fBnnn\fR is a number) If you enter a number, JOE searches for the Nth occurrence of the text\. This is useful for going to specific places in files structured in some regular manner\.
1536 .
1537 .IP "\(bu" 4
1538 \fBr\fR
1539 .
1540 .br
1541
1542 .
1543 .IP "" 0
1544 .
1545 .P
1546 Replace text\. If you enter the \fBr\fR option, then you will be further prompted for replacement text\. Each time the editor finds the search text, you will be prompted as to whether you want to replace the found search text with the replacement text\. You hit: \fBy\fR to replace the text and then find the next occurrence, \fBn\fR to not replace this text, but to then find the next occurrence, \fBr\fR to replace all of the remaining occurrences of the search text in the remainder of the file without asking for confirmation (subject to the \fBnnn\fR option above), or \fB^C\fR to stop searching and replacing\.
1547 .
1548 .P
1549 You can also hit \fBB\fR or \fBBackspace\fR to back up to the previously found text (if it had been replaced, the replacement is undone)\.
1550 .
1551 .IP "\(bu" 4
1552 \fBa\fR
1553 .
1554 .br
1555
1556 .
1557 .IP "" 0
1558 .
1559 .P
1560 The search covers all loaded buffers\. So to replace all instances of "foo" with "bar" in all \.c files in the current directory:
1561 .
1562 .IP "" 4
1563 .
1564 .nf
1565
1566 joe *\.c
1567 ^K F
1568 foo <Enter>
1569 ra <Enter>
1570 bar <Enter>
1571 .
1572 .fi
1573 .
1574 .IP "" 0
1575 .
1576 .IP "\(bu" 4
1577 \fBe\fR
1578 .
1579 .br
1580
1581 .
1582 .IP "" 0
1583 .
1584 .P
1585 The search covers all files in the grep or make error list\. You can use a UNIX command to generate a list of files and search and replace through the list\. So to replace all instances of "foo" with "bar" in all \.c files which begin with f\. You can also use "ls" and "find" instead of grep to create the file list\.
1586 .
1587 .IP "" 4
1588 .
1589 .nf
1590
1591 Esc G
1592 grep \-n foo f*\.c <Enter>
1593 ^K F
1594 foo <Enter>
1595 re <Enter>
1596 bar <Enter>
1597 .
1598 .fi
1599 .
1600 .IP "" 0
1601 .
1602 .IP "\(bu" 4
1603 \fBx\fR
1604 .
1605 .br
1606
1607 .
1608 .IP "" 0
1609 .
1610 .P
1611 JOE will use the standard syntax for regular expressions if this option is given\. In the standard syntax, these characters have their special meanings directly, and do not have to be escaped with backslash: \., *, +, ?, {, }, (, ), |, ^, $ and [\.
1612 .
1613 .IP "\(bu" 4
1614 \fBy\fR
1615 .
1616 .br
1617
1618 .
1619 .IP "" 0
1620 .
1621 .P
1622 JOE will use the JOE syntax for regular expressions instead of the standard syntax\. This overrides the "\-regex" option\.
1623 .
1624 .IP "\(bu" 4
1625 \fBv\fR
1626 .
1627 .br
1628
1629 .
1630 .IP "" 0
1631 .
1632 .P
1633 JOE will send debug information about the regular expression to the startup log\. The log can be viewed with the showlog command\.
1634 .
1635 .P
1636 You can hit \fB^L\fR to repeat the previous search\.
1637 .
1638 .P
1639 You can hit \fB^K H\fR at the search and replace options prompt to bring up a list of all search and replace options\.
1640 .
1641 .SS "Regular Expressions"
1642 A number of special character sequences may be entered as search text:
1643 .
1644 .IP "\(bu" 4
1645 \fB\e*\fR
1646 .
1647 .br
1648
1649 .
1650 .IP "" 0
1651 .
1652 .P
1653 This finds zero or more of the item to the left\. For example, if you give \fBAB\e*C\fR as the search text, JOE will try to find an A followed by any number of Bs, and then a C\.
1654 .
1655 .IP "\(bu" 4
1656 \fB\e+\fR
1657 .
1658 .br
1659
1660 .
1661 .IP "" 0
1662 .
1663 .P
1664 This finds one or more of the item to the left\. For example, if you give \fBAB\e+C\fR as the search text, JOE will try to find an A followed by one or more Bs, and then a C\.
1665 .
1666 .IP "\(bu" 4
1667 \fB\e?\fR
1668 .
1669 .br
1670
1671 .
1672 .IP "" 0
1673 .
1674 .P
1675 This indicates that the item to the left is optional\. For example, if you give \fBAB\e?C\fR as the search text, JOE will find AC or ABC\.
1676 .
1677 .IP "\(bu" 4
1678 \fB\e{min,max}\fR
1679 .
1680 .br
1681
1682 .
1683 .IP "" 0
1684 .
1685 .P
1686 This indicates that JOE should try to find a string with a specific number of occurrences of the item to the left\. For example, \fBAX\e{2,5}B\fR will match these strings: AXXB, AXXXB, AXXXXB, and AXXXXXB\. Min can be left out to indicate 0 occurrences\. Max (and the comma) can be left out to indicate any number of occurrences\.
1687 .
1688 .IP "\(bu" 4
1689 \fB\e\.\fR
1690 .
1691 .br
1692
1693 .
1694 .IP "" 0
1695 .
1696 .P
1697 This finds exactly one character\. For example, if you give \fBA\e\.B\fR as the search text, JOE will find AXB, but not AB or AXXB\.
1698 .
1699 .IP "\(bu" 4
1700 \fB\e!\fR
1701 .
1702 .br
1703
1704 .
1705 .IP "" 0
1706 .
1707 .P
1708 This works like \fB\.\fR, but matches a balanced C\-language expression\. For example, if you search for \fBmalloc(\e!\e*)\fR, then JOE will find all function calls to \fBmalloc\fR, even if there was a \fB)\fR within the parenthesis\.
1709 .
1710 .IP "\(bu" 4
1711 \fB\e|\fR
1712 .
1713 .br
1714
1715 .
1716 .IP "" 0
1717 .
1718 .P
1719 This finds the item on the left or the item on the right\. For example, if you give \fBA\e|B\fR as the search text, JOE will try to find either an A or a B\.
1720 .
1721 .IP "\(bu" 4
1722 \fB\e( \e)\fR
1723 .
1724 .br
1725
1726 .
1727 .IP "" 0
1728 .
1729 .P
1730 Use these to group characters together\. For example, if you search for \fB\e(foo\e)\e+\fR, then JOE will find strings like "foo", and "foofoofoo"\.
1731 .
1732 .IP "\(bu" 4
1733 \fB^ \e$\fR
1734 .
1735 .br
1736
1737 .
1738 .IP "" 0
1739 .
1740 .P
1741 These match the beginnings and endings of lines\. For example, if you give \fB^test\e$\fR, then JOE with find \fBtest\fR on a line by itself\.
1742 .
1743 .IP "\(bu" 4
1744 \fB\e\fI\e\e\fR\fR
1745 .
1746 .br
1747
1748 .
1749 .IP "" 0
1750 .
1751 .P
1752 These match the beginnings and endings of words\. For example, if you give \fB\e\fIis\e\e\fR\fR, then JOE will find the word "is" but will not find the "is" in "this"\.
1753 .
1754 .IP "\(bu" 4
1755 \fB\e[\.\.\.]\fR
1756 .
1757 .br
1758
1759 .
1760 .IP "" 0
1761 .
1762 .P
1763 This matches any single character which appears within the brackets\. For example, if \fB\e[Tt]his\fR is entered as the search string, then JOE finds both \fBThis\fR and \fBthis\fR\. Ranges of characters can be entered within the brackets\. For example, \fB\e[A\-Z]\fR finds any uppercase letter\. If the first character given in the brackets is \fB^\fR, then JOE tries to find any character not given in the the brackets\. To include \fB\-\fR itself, include it as the last or first character (possibly after \fB^\fR)\.
1764 .
1765 .IP "\(bu" 4
1766 \fB\e\e\fR
1767 .
1768 .br
1769
1770 .
1771 .IP "" 0
1772 .
1773 .P
1774 Matches a single \e\.
1775 .
1776 .IP "\(bu" 4
1777 \fB\en\fR
1778 .
1779 .br
1780
1781 .
1782 .IP "" 0
1783 .
1784 .P
1785 This finds the special end\-of\-line or line\-break character\.
1786 .
1787 .P
1788 A number of special character sequences may also be given in the replacement string:
1789 .
1790 .IP "\(bu" 4
1791 \fB\e&\fR
1792 .
1793 .br
1794
1795 .
1796 .IP "" 0
1797 .
1798 .P
1799 This gets replaced by the text which matched the search string\. For example, if the search string was \fB\e\fI\e*\e\e\fR\fR, which matches words, and you give \fB"\e&"\fR, then JOE will put quote marks around words\.
1800 .
1801 .IP "\(bu" 4
1802 \fB\e1 \- \e9\fR
1803 .
1804 .br
1805
1806 .
1807 .IP "" 0
1808 .
1809 .P
1810 These get replaced with the text which matched the Nth grouping; the text within the Nth set of \e( \e)\.
1811 .
1812 .IP "\(bu" 4
1813 \fB\el, \eu\fR
1814 .
1815 .br
1816
1817 .
1818 .IP "" 0
1819 .
1820 .P
1821 Convert the next character of the replacement text to lowercase or uppercase\.
1822 .
1823 .IP "\(bu" 4
1824 \fB\eL, \eU\fR
1825 .
1826 .br
1827
1828 .
1829 .IP "" 0
1830 .
1831 .P
1832 Convert all following replacement text to lowercase or uppercase\. Conversion stops when \eE is encountered\.
1833 .
1834 .IP "\(bu" 4
1835 \fB\e\e\fR
1836 .
1837 .br
1838
1839 .
1840 .IP "" 0
1841 .
1842 .P
1843 Use this if you need to put a \fB\e\fR in the replacement string\.
1844 .
1845 .IP "\(bu" 4
1846 \fB\en\fR
1847 .
1848 .br
1849
1850 .
1851 .IP "" 0
1852 .
1853 .P
1854 Use this if you need to put a line\-break in the replacement string\.
1855 .
1856 .P
1857 Some examples:
1858 .
1859 .P
1860 Suppose you have a list of addresses, each on a separate line, which starts with "Address:" and has each element separated by commas\. Like so:
1861 .
1862 .P
1863 Address: S\. Holmes, 221b Baker St\., London, England
1864 .
1865 .P
1866 If you wanted to rearrange the list, to get the country first, then the city, then the person\'s name, and then the address, you could do this:
1867 .
1868 .P
1869 Type \fB^K F\fR to start the search, and type:
1870 .
1871 .P
1872 \fBAddress:\e(\e\.\e*\e),\e(\e\.\e*\e),\e(\e\.\e*\e),\e(\e\.\e*\e)\e$\fR
1873 .
1874 .P
1875 to match "Address:", the four comma\-separated elements, and then the end of the line\. When asked for options, you would type \fBr\fR to replace the string, and then type:
1876 .
1877 .P
1878 \fBAddress:\e4,\e3,\e1,\e2\fR
1879 .
1880 .P
1881 To shuffle the information the way you want it\. After hitting return, the search would begin, and the sample line would be changed to:
1882 .
1883 .P
1884 Address: England, London, S\. Holmes, 221b Baker St\.
1885 .
1886 .P
1887 \fI\fR
1888 .
1889 .SS "Escape sequences"
1890 JOE understands the following escape sequences withing search and replacement strings:
1891 .
1892 .IP "\(bu" 4
1893 \ex{10ffff}
1894 .
1895 .br
1896
1897 .
1898 .IP "" 0
1899 .
1900 .P
1901 This matches a specific Unicode code point given in hexadecimal\.
1902 .
1903 .IP "\(bu" 4
1904 \exFF
1905 .
1906 .br
1907
1908 .
1909 .IP "" 0
1910 .
1911 .P
1912 This matches a specific character specified in hexadecimal\.
1913 .
1914 .IP "\(bu" 4
1915 \e377
1916 .
1917 .br
1918
1919 .
1920 .IP "" 0
1921 .
1922 .P
1923 This matches a specific character specified in octal\.
1924 .
1925 .IP "\(bu" 4
1926 \ep{Ll}
1927 .
1928 .br
1929
1930 .
1931 .IP "" 0
1932 .
1933 .P
1934 This matches any character in the named Unicode category or block\.
1935 .
1936 .P
1937 The block names, such as "Latin\-1 Supplement" or "Arabic" can be found here:
1938 .
1939 .P
1940 Unicode Blocks \fIftp://ftp\.unicode\.org/Public/8\.0\.0/ucd/Blocks\.txt\fR
1941 .
1942 .P
1943 The category names such as "Ll" can be found here:
1944 .
1945 .P
1946 Unicode Categories \fIftp://ftp\.unicode\.org/Public/5\.1\.0/ucd/UCD\.html#General_Category_Values\fR
1947 .
1948 .P
1949 Note that a single letter matches all of the category names which start with that letter\. For example, \ep{N} (any number) include \ep{Nd} (decimal digit), \ep{Nl} (letter number) and \ep{No} (other number)\.
1950 .
1951 .IP "\(bu" 4
1952 \ed
1953 .
1954 .br
1955
1956 .
1957 .IP "" 0
1958 .
1959 .P
1960 This matches any Unicode digit\. This is the same as \ep{Nd}\.
1961 .
1962 .IP "\(bu" 4
1963 \eD
1964 .
1965 .br
1966
1967 .
1968 .IP "" 0
1969 .
1970 .P
1971 This matches anything except for a Unicode digit\. This is the same as \e[^\ep{Nd}]\.
1972 .
1973 .IP "\(bu" 4
1974 \ew
1975 .
1976 .br
1977
1978 .
1979 .IP "" 0
1980 .
1981 .P
1982 This matches any word character\. This is the same as \e[^\ep{C}\ep{P}\ep{Z}]\.
1983 .
1984 .IP "\(bu" 4
1985 \eW
1986 .
1987 .br
1988
1989 .
1990 .IP "" 0
1991 .
1992 .P
1993 This matches anything except for a word character\. This is the same as \e[\ep{C}\ep{P}\ep{Z}]\.
1994 .
1995 .IP "\(bu" 4
1996 \es
1997 .
1998 .br
1999
2000 .
2001 .IP "" 0
2002 .
2003 .P
2004 This matches any space character\. This is the same as \e[\et\er\ef\en\ep{Z}]\.
2005 .
2006 .IP "\(bu" 4
2007 \eS
2008 .
2009 .br
2010
2011 .
2012 .IP "" 0
2013 .
2014 .P
2015 This matches anything except for a spacing character\. This is the same as \e[^\et\er\ef\en\ep{Z}]\.
2016 .
2017 .IP "\(bu" 4
2018 \ei
2019 .
2020 .br
2021
2022 .
2023 .IP "" 0
2024 .
2025 .P
2026 This matches an identifier start character\. This is the same as \e[\ep{L}\ep{Pc}\ep{Nl}]\.
2027 .
2028 .IP "\(bu" 4
2029 \eI
2030 .
2031 .br
2032
2033 .
2034 .IP "" 0
2035 .
2036 .P
2037 This matches anything except for an identifier start character\. This is the same as \e[^\ep{L}\ep{Pc}\ep{Nl}]\.
2038 .
2039 .IP "\(bu" 4
2040 \ec
2041 .
2042 .br
2043
2044 .
2045 .IP "" 0
2046 .
2047 .P
2048 This matches an identifier continuation character\. This is the same as \e[\ei\ep{Mn}\ep{Mc}\ep{Nd}\ex{200c}\ex{200d}]\.
2049 .
2050 .IP "\(bu" 4
2051 \eC
2052 .
2053 .br
2054
2055 .
2056 .IP "" 0
2057 .
2058 .P
2059 This matches anything except for an identifier continuation character\. This is the same as \e[^\ei\ep{Mn}\ep{Mc}\ep{Nd}\ex{200c}\ex{200d}]\.
2060 .
2061 .IP "\(bu" 4
2062 \et Tab
2063 .
2064 .IP "\(bu" 4
2065 \en Newline
2066 .
2067 .IP "\(bu" 4
2068 \er Carriage return
2069 .
2070 .IP "\(bu" 4
2071 \eb Backspace
2072 .
2073 .IP "\(bu" 4
2074 \ea Alert
2075 .
2076 .IP "\(bu" 4
2077 \ef Formfeed
2078 .
2079 .IP "\(bu" 4
2080 \ee Escape
2081 .
2082 .IP "\(bu" 4
2083 \e\e Backslash
2084 .
2085 .IP "" 0
2086 .
2087 .SH "Incremental search"
2088 Use \fBEsc S\fR to start an increment search forwards, or \fBEsc R\fR to start an incremental search backwards\. As you type the search string, the cursor will jump to the first text that matches the regular expression you have entered so far\.
2089 .
2090 .P
2091 Hit \fBEsc S\fR or \fBEsc R\fR again to find the next occurrence of the text or to switch the direction of the search\.
2092 .
2093 .P
2094 \fB^S\fR, \fB^\e\fR and \fB^L\fR have the same effect as \fBEsc S\fR\. \fB^R\fR has the same effect as \fBEsc R\fR\. These keys are to support JMACS\.
2095 .
2096 .P
2097 Hit \fBBackspace\fR to undo the last incremental search action\. The last action could be a repeat of a previous search or the entering of a new character\.
2098 .
2099 .P
2100 Use \fB^Q\fR to insert control characters into the search text\. Previously, ` could also be used for this\.
2101 .
2102 .P
2103 Hit any other key to exit the increment search\.
2104 .
2105 .SH "Goto matching delimiter"
2106 Hit \fB^G\fR to jump between matching delimiters\. This works on both character delimiters (like \'(\' and \')\') and word delimiters for languages like Pascal and Verilog which use "begin" and "end" to delimit blocks\. It also works for matching start and end tags in XML\. If a word is not known, \fB^G\fR starts a search with the word moved into the search prompt\.
2107 .
2108 .P
2109 For \fB^G\fR to work on word delimiters, the cursor must be positioned on the first letter of the word\. So in XML, if the cursor is on the < in <foo>, it will jump to the >\. But if it is one the \'f\', it will jump to the matching </foo>\. Likewise, in C, \fB^G\fR will jump between #if, #else and #endif, but you need to position the cursor on the letter, not the \'#\'\.
2110 .
2111 .P
2112 \fB^G\fR is smart enough to skip delimiters found in quoted or commented\-out matter\. You need to tell JOE how your language indicates this: see the \fBftyperc\fR file for examples of how this is done\.
2113 .
2114 .P
2115 The are a number of options which control the behavior of \fB^G\fR\. These options control which kinds of comments \fB^G\fR can skip over:
2116 .
2117 .IP "\(bu" 4
2118 c_comment
2119 .
2120 .IP "\(bu" 4
2121 cpp_comment
2122 .
2123 .IP "\(bu" 4
2124 pount_comment
2125 .
2126 .IP "\(bu" 4
2127 semi_comment
2128 .
2129 .IP "\(bu" 4
2130 vhdl_comment
2131 .
2132 .IP "" 0
2133 .
2134 .P
2135 These options determine which kinds of strings \fB^G\fR can skip over:
2136 .
2137 .IP "\(bu" 4
2138 single_quoted
2139 .
2140 .IP "\(bu" 4
2141 double_quoted
2142 .
2143 .IP "" 0
2144 .
2145 .P
2146 This option allows an annotated syntax file to determine which text can be counted as comments or strings which can be skipped over by \fB^G\fR:
2147 .
2148 .IP "\(bu" 4
2149 highlighter_context
2150 .
2151 .IP "" 0
2152 .
2153 .P
2154 This option enables the use of syntax files to identify comments and strings which should be skipped over during \fB^G\fR matching\. The syntax file states should be annotated with the \fBstring\fR and \fBcomment\fR keywords for this to work\.
2155 .
2156 .IP "\(bu" 4
2157 text_delimiters
2158 .
2159 .IP "" 0
2160 .
2161 .P
2162 This option provides a list of word delimiters to match\. For example, "begin=end:if=elif=else=endif" means that \fB^G\fR will jump between the matching if, elif, else and endif\. It will also jump between begin and end\.
2163 .
2164 .P
2165 \fB^G\fR has a built\-in table for matching character delimiters\- it knows that \fB(\fR goes with \fB)\fR\.
2166 .
2167 .P
2168 \fB^G\fR has a built\-in parser to handle start/end tag matching for XML\.
2169 .
2170 .P
2171 \fI\fR
2172 .
2173 .SH "Regions"
2174 If you want to move, copy, save or delete a specific section of text, you can do it with highlighted blocks\. First, move the cursor to the start of the section of text you want to work on, and press \fB^K B\fR\. Then move the cursor to the character just after the end of the text you want to affect and press \fB^K K\fR\. The text between the \fB^K B\fR and \fB^K K\fR should become highlighted\. Now you can move your cursor to someplace else in your document and press \fB^K M\fR to move the highlighted text there\.
2175 .
2176 .br
2177 You can press \fB^K C\fR to make a copy of the highlighted text and insert it to where the cursor is positioned\. \fB^K Y\fR to deletes the highlighted text\. \fB^K W\fR, writes the highlighted text to a file\.
2178 .
2179 .P
2180 A very useful command is \fB^K /\fR, which filters a block of text through a UNIX command\. For example, if you select a list of words with \fB^K B\fR and \fB^K K\fR, and then type \fB^K / sort\fR, the list of words will be sorted\. Another useful UNIX command for \fB^K /\fR, is \fBtr\fR\. If you type \fB^K / tr a\-z A\-Z\fR, then all of the letters in the highlighted block will be converted to uppercase\.
2181 .
2182 .SS "How do I deselect a highlighted region?"
2183 After you are finished with some region operations, you can just leave the highlighting on if you don\'t mind it (but don\'t accidentally hit \fB^K Y\fR)\. If it really bothers you, however, just hit \fB^K B ^K K\fR, to turn the highlighting off\.
2184 .
2185 .P
2186 Beginning with JOE 4\.2, you can hit \fB^C\fR to cancel the region selection\.
2187 .
2188 .SS "New ways of selecting regions"
2189 The classic way is to hit \fB^K B\fR at the beginning and \fB^K K\fR at the end\. These set pointers called markb and markk\. Once these are set you can jump to markb with \fBEsc B\fR and jump to markk with \fBEsc K\fR\.
2190 .
2191 .P
2192 New way: hit Ctrl\-\fBRight Arrow\fR to start selecting rightward\. Each time you hit Ctrl\-\fBRight Arrow\fR, the block is extended one more to the right\. This uses a simple macro: "begin_marking,rtarw,toggle_marking"\.
2193 .
2194 .P
2195 Unfortunately, there is no standard way to get the keysequence given by the terminal emulator when you hit Ctrl\-\fBRight Arrow\fR\. Instead you have to determine this sequence yourself and enter it directly in the joerc file\. Some examples are given for Xterm and gnome\-terminal\. Hit \fB^Q\fR Ctrl\-\fBRight Arrow\fR within JOE to have the sequence shown on your screen\. Note that Putty uses \fBEsc Esc [ C\fR which will not appear with \fB^Q Right Arrow\fR (also \fBEsc Esc\fR is the set bookmark command, so you need to unbind it to do this in Putty)\.
2196 .
2197 .P
2198 Also you can hit Ctrl\-\fBDelete\fR to cut and Ctrl\-\fBInsert\fR to paste if the sequence for these keys are known\.
2199 .
2200 .P
2201 The mouse can also be used to select text if mouse support is enabled in JOE\.
2202 .
2203 .SH "Indenting program blocks"
2204 Auto\-indent mode is toggled with the \fB^T I\fR command\. The \fBjoerc\fR file is normally set up so that files with names ending with \.p, \.c or \.h have auto\-indent mode enabled\. When auto\-indent mode is enabled and you hit \fBEnter\fR, the cursor will be placed in the same column that the first non\-whitespace character was on in the original line\.
2205 .
2206 .P
2207 You can use the \fB^K ,\fR and \fB^K \.\fR commands to shift a block of text to the left or right\. If no highlighting is set when you give these commands, the program block (as indicated by indentation) that the cursor is located in will be selected, and will be moved by subsequent \fB^K ,\fR and \fB^K \.\fR commands\.
2208 .
2209 .P
2210 The number of columns these commands shift by and the character used for shifting can be set through the istep and indentc options\. These options are available in the \fB^T\fR menu\. Also, \fB^T =\fR can be used to quickly select from a number of common values for indentation step and character\.
2211 .
2212 .P
2213 JOE has a number of additional options related to indenting programs:
2214 .
2215 .IP "\(bu" 4
2216 smartbacks
2217 .
2218 .br
2219 Enable smart backspace and tab\. When this mode is set \fBBackspace\fR and \fBTab\fR indent or unindent based on the values of the istep and indentc options\.
2220 .
2221 .br
2222
2223 .
2224 .IP "\(bu" 4
2225 smarthome
2226 .
2227 .br
2228 The \fBHome\fR and \fB^A\fR keys first move the cursor to the beginning of the line, then if hit again, to the first non\-blank character\.
2229 .
2230 .br
2231
2232 .
2233 .IP "\(bu" 4
2234 indentfirst
2235 .
2236 .br
2237 Smart home goes to first non\-blank character first, instead of going to the beginning of the line first\.
2238 .
2239 .br
2240
2241 .
2242 .IP "\(bu" 4
2243 purify
2244 .
2245 .br
2246 Fix indentation if necessary before shifting or smart backspace\. For example, if indentation uses a mix of tabs and spaces, and indentc is space, then indentation will be converted to all spaces before the shifting operation\.
2247 .
2248 .br
2249
2250 .
2251 .IP "\(bu" 4
2252 guess_indent
2253 .
2254 .br
2255 When set, JOE tries to guess the indentation character and indentation step based on the contents of the file\. The algorithm is to find the greatest common factor of the three most common indentations found in the file\.
2256 .
2257 .br
2258
2259 .
2260 .IP "" 0
2261 .
2262 .SH "Rectangle mode"
2263 Type \fB^T X\fR to have \fB^K B\fR and \fB^K K\fR select rectangular blocks instead of stream\-of\-text blocks\. This is also known as columnar mode\. This mode is useful for moving, copying, deleting or saving columns of text\. You can also filter columns of text with the \fB^K /\fR command\- if you want to sort a column, for example\. The insert file command, \fB^K R\fR is also affected\.
2264 .
2265 .P
2266 When rectangle mode is selected, overtype mode is also useful (\fB^T T\fR)\. When overtype mode is selected, rectangles will replace existing text instead of getting inserted before it\. Also the delete block command (\fB^K Y\fR) will clear the selected rectangle with \fBSpaces\fR and \fBTabs\fR instead of deleting it\. Overtype mode is especially useful for the filter block command (\fB^K /\fR), since it will maintain the original width of the selected column\.
2267 .
2268 .SH "Picture mode"
2269 Use \fB^T P\fR to enter or exit picture mode\. Picture mode helps with ASCII drawings\.
2270 .
2271 .P
2272 Picture mode controls how JOE handles the case where the cursor is past the ends of lines\. This happens when you use the up or down arrow keys to move the cursor from the end of a long line to a short line\.
2273 .
2274 .P
2275 If you attempt to type a character in this case:
2276 .
2277 .P
2278 If picture mode is off, the cursor will jump to the end of the line and insert it there\.
2279 .
2280 .P
2281 If picture mode is on, the line is filled with spaces so that the character can be inserted at the cursor position\.
2282 .
2283 .SH "Windows"
2284 You can edit more than one file at the same time or edit two or more different places of the same file\. To do this, hit \fB^K O\fR, to split the screen into two windows\. Use \fB^K P\fR or \fB^K N\fR to move the cursor into the top window or the lower window\. Use \fB^K E\fR to edit a new file in one of the windows\. A window will go away when you save the file with \fB^K X\fR or abort the file with \fB^C\fR\. If you abort a file which exists in two windows, one of the window goes away, not the file\.
2285 .
2286 .P
2287 You can hit \fB^K O\fR within a window to create even more windows\. If you have too many windows on the screen, but you don\'t want to eliminate them, you can hit \fB^K I\fR\. This will show only the window the cursor is in, or if there was only one window on the screen to begin with, try to fit all hidden windows on the screen\. If there are more windows than can fit on the screen, you can hit \fB^K N\fR on the bottom\-most window or \fB^K P\fR on the top\-most window to get to them\.
2288 .
2289 .P
2290 If you gave more than one file name to JOE on the command line, each file will be placed in a different window\.
2291 .
2292 .P
2293 You can change the height of the windows with the \fB^K G\fR and \fB^K T\fR commands\.
2294 .
2295 .SS "Windowing system model"
2296 JOE has an unusual model for its windowing system\. Basically you have a ring of windows, but only a section of this ring may fit on the screen\. The windows not on the screen still exist, they are just scrolled off\. When you hit \fB^K N\fR on the bottom window of the screen, it scrolls further windows from the ring onto the screen, possibly letting the top window scroll out of view\.
2297 .
2298 .P
2299 Native JOE tries to keep each loaded buffer in a window, so users can find all of the buffers by scrolling through the windows\. The \fBexplode\fR command (\fB^K I\fR) either expands all windows to the size of the screen so that only one window can fit on the screen, or shrinks them all as much as possible to fit many on the screen\.
2300 .
2301 .P
2302 On the other hand, JOE supports "orphan" buffers\- files loaded into the editor, but which are not in a window\. \fB^C\fR normally closes a window and discards the buffer that was in it\. If you hit \fB^C\fR on the last remaining window, it will normally exit the editor\. However, if there are orphan buffers, \fB^C\fR will instead load them into this final window to give you a chance to explicitly discard them\. If the \fBorphan\fR option is given on the command line, as in \fBjoe \-orphan *\.c\fR, then JOE only loads the first file into a window and leaves all the rest as orphans\.
2303 .
2304 .P
2305 \fBorphan\fR also controls whether the edit command \fB^K E\fR creates a new window for a newly loaded file, or reuses the current window (orphaning its previous occupant)\.
2306 .
2307 .P
2308 The \fBbufed\fR command prompts for a name of a buffer to switch into a window\. Its completion list will show all buffers, including orphans and buffers which appear in other windows\. \fBEsc V\fR and \fBEsc U\fR (\fBnbuf\fR and \fBpbuf\fR commands) allow you to cycle through all buffers within a single window\.
2309 .
2310 .P
2311 Windows maintain a stack of occupants to support the pop\-up shell window feature\. When a pop\-up window is dismissed, the previous buffer is returned to the window\.
2312 .
2313 .SH "Scratch buffers"
2314 Scratch buffers are buffers which JOE does not worry about trying to preserve\. JOE will not ask to save modified scratch buffers\. Pop\-up shell windows, the startup log and compile and grep message windows are scratch buffers\. You can create your own scratch buffer with the \fBscratch\fR command\.
2315 .
2316 .P
2317 The following commands load scratch buffers:
2318 .
2319 .IP "\(bu" 4
2320 \fBshowlog\fR Show startup log
2321 .
2322 .IP "\(bu" 4
2323 \fBmwind\fR Show message window (compile / grep messages from \fBEsc C\fR and \fBEsc G\fR commands)\.
2324 .
2325 .IP "" 0
2326 .
2327 .SH "Keyboard macros"
2328 Macros allow you to record a series of keystrokes and replay them with the press of two keys\. This is useful to automate repetitive tasks\. To start a macro recording, hit \fB^K [\fR followed by a number from 0 to 9\. The status line will display (Macro n recording\.\.\.)\. Now, type in the series of keystrokes that you want to be able to repeat\. The commands you type will have their usual effects\. Hit \fB^K ]\fR to stop recording the macro\. Hit \fB^K\fR followed by the number you recorded the macro in to execute one iteration of the key\-strokes\.
2329 .
2330 .P
2331 For example, if you want to put "**" in front of a number of lines, you can type:
2332 .
2333 .P
2334 \fB^K [ 0 ^A **\fR\fIdown arrow\e\fR \fB^K ]\fR
2335 .
2336 .P
2337 Which starts the macro recording, moves the cursor to the beginning of the line, inserts "**", moves the cursor down one line, and then ends the recording\. Since we included the key\-strokes needed to position the cursor on the next line, we can repeatedly use this macro without having to move the cursor ourselves, something you should always keep in mind when recording a macro\.
2338 .
2339 .SS "Keyboard macro subroutines"
2340 If you find that the macro you are recording itself has a repeated set of key\-strokes in it, you can record a macro within the macro, as long as you use a different macro number\. Also you can execute previously recorded macros from within new macros\.
2341 .
2342 .SS "Query suspend"
2343 If your macro includes a prompt for user input, and you want the user to fill in the prompt every time the macro is executed, hit \fB^K ?\fR at the point in the macro recording where the user action is required\. Keyboard input will not be recorded at this point\. When the user completes the prompt, macro recording will continue\.
2344 .
2345 .P
2346 When the macro is executed, the macro player will pause at the point where \fB^K ?\fR was entered to allow user input\. When the user completes the prompt, the player continues with the rest of the macro\.
2347 .
2348 .SS "Repeat"
2349 You can use the repeat command, \fB^K \e\fR, to repeat a macro, or any other edit command or even a normal character, a specified number of times\. Hit \fB^K \e\fR, type in the number of times you want the command repeated and press \fBEnter\fR\. The next edit command you now give will be repeated that many times\. For example, to delete the next 20 lines of text, type:
2350 .
2351 .P
2352 \fB^K \e 20\fR\fIreturn\fR\fB^Y\fR
2353 .
2354 .SH "Macros and commands"
2355 A macro is a comma separated list of commands\. When the macro is executed, each command is executed until either the end of the list is reached, or one of the commands fails (non\-zero return value from the command)\. Failed commands beep if you have beeps enabled (\fB^T B\fR)\.
2356 .
2357 .P
2358 Hit \fBEsc D\fR to insert the current set of keyboard macros as text into the current buffer\. For example, the "**" insert macro above looks like this:
2359 .
2360 .IP "" 4
2361 .
2362 .nf
2363
2364 home,"**",dnarw ^K 0 Macro 0
2365 .
2366 .fi
2367 .
2368 .IP "" 0
2369 .
2370 .P
2371 You could insert this into your \.joerc file and change the key sequence (the \fBK 0\fR) to something more permanent\.
2372 .
2373 .SS "Define your own"
2374 You can bind macros to key sequences or define your own named macros in the joerc file\. For example, this will define a macro called \fBfoo\fR:
2375 .
2376 .IP "" 4
2377 .
2378 .nf
2379
2380 :def foo eof,bol
2381 .
2382 .fi
2383 .
2384 .IP "" 0
2385 .
2386 .P
2387 \fBfoo\fR will position the cursor at the beginning of the last line of the file\. \fBeof\fR jumps to the end of the file\. \fBbol\fR jumps to the beginning of a line\. Once a macro has been named this way it will show up in the completion list of the \fBEsc X\fR command prompt\.
2388 .
2389 .SS "Command prompt"
2390 You can execute a macro directly by typing it into the command prompt\. Hit \fBEsc X\fR to bring up the command prompt\. Hit \fBTab\fR at this prompt for a completion list of all available commands\.
2391 .
2392 .P
2393 Here is a \fIcomplete list of commands\fR\.
2394 .
2395 .SS "Macro don\'t stop modifier"
2396 Sometimes, you expect commands to sometimes fail, but want the rest of the commands in the list to be executed anyway\. To mark a command which is allowed to fail, postfix it with \'!\'\. For example, here a macro which hits down page in the window above:
2397 .
2398 .IP "" 4
2399 .
2400 .nf
2401
2402 prevw,pgdn!,nextw
2403 .
2404 .fi
2405 .
2406 .IP "" 0
2407 .
2408 .P
2409 If prevw fails, the macro is aborted as usual\. Even if pgdn fails (already at end of buffer), nextw will be executed so that the cursor is returned to the original window\.
2410 .
2411 .SS "Macro repeat argument modifiers"
2412 Repeat arguments can be specified with \fB^K \e\fR\. When a command is executed with a repeat argument, it is repeatedly executed the specified number of times\. If the repeat argument is negative, an opposite command (if one exists) is executed instead\. For example, if you repeat "rtarw" \-3 times, "ltarw" will be repeated 3 times\. If a negative argument is given for a command which does not have an opposite, the repeat argument is ignored\.
2413 .
2414 .P
2415 Normally, if a repeat argument is specified for a macro, the macro is simply repeated the given number of times\. If a negative argument is given, the argument is ignored\.
2416 .
2417 .P
2418 Sometimes you want to allow negative arguments for macros and have their behavior modified\. To do this, postfix each command within the macro which should be switched to its opposite for negative arguments with \'\-\'\. For example, here is the page down other window macro:
2419 .
2420 .IP "" 4
2421 .
2422 .nf
2423
2424 prevw,pgdn\-!,nextw
2425 .
2426 .fi
2427 .
2428 .IP "" 0
2429 .
2430 .P
2431 Now if you execute this with an argument of \-2, it will be repeated twice, but pgup will be executed instead of pgdn\. (note that several postfix modifiers can be placed after each command)\.
2432 .
2433 .P
2434 Sometimes when a repeat argument is given to macro, you want only one of the commands in the list to be repeated, not the entire macro\. This can be indicated as follows:
2435 .
2436 .IP "" 4
2437 .
2438 .nf
2439
2440 prevw,pgdn#!,nextw
2441 .
2442 .fi
2443 .
2444 .IP "" 0
2445 .
2446 .P
2447 If this is executed with an argument of 2, prevw is executed once, pgdn is executed twice, and nextw is executed once\.
2448 .
2449 .P
2450 Finally, even more complex semantics can be expressed with the "if" command:
2451 .
2452 .IP "" 4
2453 .
2454 .nf
2455
2456 if~,"arg<0",then,
2457 ltarw,
2458 else,
2459 rtarw,
2460 endif
2461 .
2462 .fi
2463 .
2464 .IP "" 0
2465 .
2466 .P
2467 When the macro is executed, the "arg" math variable is set to the given repeat argument\. The "argset" variable is set to true if the user set an argument, even if it\'s 1\. If no argument was given, argset is false\.
2468 .
2469 .P
2470 If any command in the list is postfixed with ~ (if above), the macro is not repeated, even if there is an argument\. \'arg\' is still set to the given repeat count, however\.
2471 .
2472 .SS "\'psh\'/\'query\' interaction"
2473 The \'psh\' command saves the \fB^K B\fR and \fB^K K\fR positions on a stack\. When the macro completes, (or when the \'pop\' command is called) the positions are restored\.
2474 .
2475 .P
2476 The \'query\' command suspends macro execution until the current dialog is complete\. It also suspends the automatic \'pop\' which happens at the end of a macro\- so if the macro ends in a dialog you often want to call \'query\' to prevent the \fB^K B\fR \fB^K K\fR positions from being restored too early\.
2477 .
2478 .SH "Tags search"
2479 If you are editing a large C program with many source files, you can use the \fBctags\fR program to generate a \fBtags\fR file\. This file contains a list of program symbols and the files and positions where the symbols are defined\.
2480 .
2481 .P
2482 First, create the tags file with the "ctags" program\. For example:
2483 .
2484 .IP "" 4
2485 .
2486 .nf
2487
2488 ctags *\.c *\.h
2489 .
2490 .fi
2491 .
2492 .IP "" 0
2493 .
2494 .P
2495 This will create a file called "tags" in the current directory\.
2496 .
2497 .P
2498 JOE looks for the "tags" file in the current directory\. If there is none, it will try to open the file specified by the TAGS environment variable\.
2499 .
2500 .P
2501 Paths in the tags file are always relative to location of the tags file itself\.
2502 .
2503 .P
2504 The tags file contains a list of identifier definition locations in one of these formats:
2505 .
2506 .IP "" 4
2507 .
2508 .nf
2509
2510 identifier filename /search\-expression/[;comments]
2511
2512 identifier filename ?search\-expression?[;comments]
2513
2514 identifier filename line\-number[;comments]
2515 .
2516 .fi
2517 .
2518 .IP "" 0
2519 .
2520 .P
2521 Some versions of ctags include class\-names in the identifiers:
2522 .
2523 .IP "" 4
2524 .
2525 .nf
2526
2527 class::member
2528 .
2529 .fi
2530 .
2531 .IP "" 0
2532 .
2533 .P
2534 In this case, JOE will match on any of these strings:
2535 .
2536 .IP "" 4
2537 .
2538 .nf
2539
2540 member
2541 ::member
2542 class::member
2543 .
2544 .fi
2545 .
2546 .IP "" 0
2547 .
2548 .P
2549 Some versions of ctags include a filename in the identifier:
2550 .
2551 .IP "" 4
2552 .
2553 .nf
2554
2555 filename:identifier
2556 .
2557 .fi
2558 .
2559 .IP "" 0
2560 .
2561 .P
2562 In this case JOE will only find the identifier if the buffer name matches the filename\.
2563 .
2564 .P
2565 The search\-expression is a vi regular expression, but JOE only supports the following special characters:
2566 .
2567 .IP "" 4
2568 .
2569 .nf
2570
2571 ^ at the beginning means expression starts at beginning of line
2572
2573 $ at the end means expression ends at end of line
2574
2575 \ex quote x (suppress meaning of /, ?, ^ or $)
2576 .
2577 .fi
2578 .
2579 .IP "" 0
2580 .
2581 .P
2582 Type \fB^K ;\fR to bring up a tags search prompt\. If the cursor had been on an identifier, the prompt is pre\-loaded with it\. Tab completion works in this prompt (it uses the tags file to find completions)\.
2583 .
2584 .P
2585 When you hit \fBEnter\fR, the tags search commences:
2586 .
2587 .P
2588 If there is one and only one match, JOE will jump directly to the definition\.
2589 .
2590 .P
2591 If there are multiple matches, then the behavior is controlled by the notagsmenu option\. If notagsmenu is enabled JOE jumps to the first definition\. If you hit \fB^K ;\fR again before hitting any other keys, JOE jumps to the next definition, and so on\. The "tagjump" command also performs this function\.
2592 .
2593 .P
2594 If notagsmenu is disabled, JOE brings up a menu of all the matches\. You select the one you want and JOE jumps to it\. If you hit \fB^K ;\fR again before hitting any other keys, the same menu re\-appears with the cursor left in the original location\.
2595 .
2596 .P
2597 You can hit \fB^K \-\fR to move the cursor back to the original location before the tags search (often \fB^C\fR will work as well)\.
2598 .
2599 .P
2600 Since \fB^K ;\fR loads the definition file into the current window, you probably want to split the window first with \fB^K O\fR, to have both the original file and the definition file loaded\.
2601 .
2602 .SH "Calculator"
2603 JOE has a built\-in calculator which can be invoked with \fBEsc M\fR\.
2604 .
2605 .SS "Math functions"
2606 sin, cos, tan, exp, sqrt, cbrt, ln, log, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, int, floor, ceil, abs, erf, erfc, j0, j1, y0, y1
2607 .
2608 .SS "Variables"
2609 .
2610 .IP "\(bu" 4
2611 e
2612 .
2613 .br
2614 Set to \'e\'
2615 .
2616 .br
2617
2618 .
2619 .IP "\(bu" 4
2620 pi
2621 .
2622 .br
2623 Set to \'pi\'
2624 .
2625 .br
2626
2627 .
2628 .IP "\(bu" 4
2629 top
2630 .
2631 .br
2632 Set to line number of top window line
2633 .
2634 .br
2635
2636 .
2637 .IP "\(bu" 4
2638 lines
2639 .
2640 .br
2641 Set to number of lines in file
2642 .
2643 .br
2644
2645 .
2646 .IP "\(bu" 4
2647 line
2648 .
2649 .br
2650 Set to current line number
2651 .
2652 .br
2653
2654 .
2655 .IP "\(bu" 4
2656 col
2657 .
2658 .br
2659 Set to current column number
2660 .
2661 .br
2662
2663 .
2664 .IP "\(bu" 4
2665 byte
2666 .
2667 .br
2668 Set to current byte number
2669 .
2670 .br
2671
2672 .
2673 .IP "\(bu" 4
2674 size
2675 .
2676 .br
2677 Set to buffer size
2678 .
2679 .br
2680
2681 .
2682 .IP "\(bu" 4
2683 height
2684 .
2685 .br
2686 Set to window height
2687 .
2688 .br
2689
2690 .
2691 .IP "\(bu" 4
2692 width
2693 .
2694 .br
2695 Set to window width
2696 .
2697 .br
2698
2699 .
2700 .IP "\(bu" 4
2701 char
2702 .
2703 .br
2704 Set to ASCII val of character under cursor
2705 .
2706 .br
2707
2708 .
2709 .IP "\(bu" 4
2710 markv
2711 .
2712 .br
2713 True if there is a valid block set (^KB \.\.\. ^KK)
2714 .
2715 .br
2716
2717 .
2718 .IP "\(bu" 4
2719 rdonly
2720 .
2721 .br
2722 True if file is read\-only
2723 .
2724 .br
2725
2726 .
2727 .IP "\(bu" 4
2728 arg
2729 .
2730 .br
2731 Current repeat argument
2732 .
2733 .br
2734
2735 .
2736 .IP "\(bu" 4
2737 argset
2738 .
2739 .br
2740 True if a repeat argument was given
2741 .
2742 .br
2743
2744 .
2745 .IP "\(bu" 4
2746 is_shell
2747 .
2748 .br
2749 True if executed in an active shell window
2750 .
2751 .br
2752
2753 .
2754 .IP "\(bu" 4
2755 no_windows
2756 .
2757 .br
2758 No\. buffer windows on the screen
2759 .
2760 .br
2761
2762 .
2763 .IP "\(bu" 4
2764 ans
2765 .
2766 .br
2767 Result of previous expression
2768 .
2769 .br
2770
2771 .
2772 .IP "" 0
2773 .
2774 .SS "Commands"
2775 .
2776 .IP "\(bu" 4
2777 hex
2778 .
2779 .br
2780 Hex display mode
2781 .
2782 .br
2783
2784 .
2785 .IP "\(bu" 4
2786 dec
2787 .
2788 .br
2789 Decimal display mode
2790 .
2791 .br
2792
2793 .
2794 .IP "\(bu" 4
2795 ins
2796 .
2797 .br
2798 Insert \'ans\' into buffer
2799 .
2800 .br
2801
2802 .
2803 .IP "\(bu" 4
2804 sum
2805 .
2806 .br
2807 Sum of numbers in block
2808 .
2809 .br
2810
2811 .
2812 .IP "\(bu" 4
2813 cnt
2814 .
2815 .br
2816 Count numbers in block
2817 .
2818 .br
2819
2820 .
2821 .IP "\(bu" 4
2822 avg
2823 .
2824 .br
2825 Average value of numbers in block
2826 .
2827 .br
2828
2829 .
2830 .IP "\(bu" 4
2831 dev
2832 .
2833 .br
2834 Standard deviation of numbers in block
2835 .
2836 .br
2837
2838 .
2839 .IP "\(bu" 4
2840 eval
2841 .
2842 .br
2843 Evaluate math expressions in block (or whole file if no block set)\.
2844 .
2845 .br
2846
2847 .
2848 .IP "\(bu" 4
2849 joe(\.\.\.)
2850 .
2851 .br
2852 Execute a JOE macro (argument in same format as joerc file macros)\. Return value of JOE macro is returned (for macro success, return true (non\-zero))\.
2853 .
2854 .br
2855
2856 .
2857 .IP "" 0
2858 .
2859 .P
2860 For example:
2861 .
2862 .IP "" 4
2863 .
2864 .nf
2865
2866 joe(sys,"[ 1 == 1 ]",rtn)
2867 .
2868 .fi
2869 .
2870 .IP "" 0
2871 .
2872 .P
2873 ([ 1 == 1 ]) is a shell command\. "[" is a synonym for the "test" UNIX command\.
2874 .
2875 .P
2876 Returns true\.
2877 .
2878 .P
2879 Remember: argument for JOE macro command "if" is a math expression\. So for example, the macro:
2880 .
2881 .IP "" 4
2882 .
2883 .nf
2884
2885 if,"joe(sys,\e"[ 1 == 1 ]\e",rtn)",then,"TRUE",endif
2886 .
2887 .fi
2888 .
2889 .IP "" 0
2890 .
2891 .P
2892 Types TRUE into the buffer\.
2893 .
2894 .SS "Operators:"
2895 .
2896 .IP "\(bu" 4
2897 !x
2898 .
2899 .br
2900 Logical not of x\.
2901 .
2902 .br
2903
2904 .
2905 .IP "\(bu" 4
2906 x
2907 .
2908 .br
2909 Raise x to power of y\.
2910 .
2911 .br
2912
2913 .
2914 .IP "\(bu" 4
2915 a*b
2916 .
2917 .br
2918 Multiply\.
2919 .
2920 .br
2921
2922 .
2923 .IP "\(bu" 4
2924 a/b
2925 .
2926 .br
2927 Divide\.
2928 .
2929 .br
2930
2931 .
2932 .IP "\(bu" 4
2933 a%b
2934 .
2935 .br
2936 Modulus\.
2937 .
2938 .br
2939
2940 .
2941 .IP "\(bu" 4
2942 a+b
2943 .
2944 .br
2945 Add\.
2946 .
2947 .br
2948
2949 .
2950 .IP "\(bu" 4
2951 a\-b
2952 .
2953 .br
2954 Subtract\.
2955 .
2956 .br
2957
2958 .
2959 .IP "\(bu" 4
2960 a<b
2961 .
2962 .br
2963 True if a is less than b\.
2964 .
2965 .br
2966
2967 .
2968 .IP "\(bu" 4
2969 a<=b
2970 .
2971 .br
2972 True if a is less than or equal to b\.
2973 .
2974 .br
2975
2976 .
2977 .IP "\(bu" 4
2978 a>b
2979 .
2980 .br
2981 True if a is greater than b\.
2982 .
2983 .br
2984
2985 .
2986 .IP "\(bu" 4
2987 a>=b
2988 .
2989 .br
2990 True if a is greater than or equal to b\.
2991 .
2992 .br
2993
2994 .
2995 .IP "\(bu" 4
2996 a==b
2997 .
2998 .br
2999 True if a equals b\.
3000 .
3001 .br
3002
3003 .
3004 .IP "\(bu" 4
3005 a!=b
3006 .
3007 .br
3008 True if a does not equal b\.
3009 .
3010 .br
3011
3012 .
3013 .IP "\(bu" 4
3014 a&&b
3015 .
3016 .br
3017 True if both a and b are true\.
3018 .
3019 .br
3020
3021 .
3022 .IP "\(bu" 4
3023 a||b
3024 .
3025 .br
3026 True if ether a or b are true\.
3027 .
3028 .br
3029
3030 .
3031 .IP "\(bu" 4
3032 a?b:c
3033 .
3034 .br
3035 If a is true return b, otherwise return c\.
3036 .
3037 .br
3038
3039 .
3040 .IP "\(bu" 4
3041 a=b
3042 .
3043 .br
3044 Assign b to a\.
3045 .
3046 .br
3047
3048 .
3049 .IP "\(bu" 4
3050 a:b
3051 .
3052 .br
3053 Execute a, then execute b\.
3054 .
3055 .br
3056
3057 .
3058 .IP "" 0
3059 .
3060 .TP
3061 &&, || and ? : work as in C and sh as far as side effects: if the
3062 .
3063 .TP
3064 left side of && is false, the right side is not evaluated\.
3065 is expression separator\.
3066 .
3067 .SH "Shell windows"
3068 Hit \fB^K \'\fR to run a command shell in one of JOE\'s windows\. When the cursor is at the end of a shell window (use \fB^K V\fR if it\'s not), whatever you type is passed to the shell instead of the buffer\. Any output from the shell or from commands executed in the shell is appended to the shell window (the cursor will follow this output if it\'s at the end of the shell window)\. This command is useful for recording the results of shell commands\- for example the output of \fBmake\fR, the result of \fBgrep\fRping a set of files for a string, or directory listings from \fBFTP\fR sessions\. Besides typeable characters, the keys \fB^C\fR, \fBBackspace\fR, \fBDel\fR, \fBReturn\fR and \fB^D\fR are passed to the shell\. Type the shell \fBexit\fR command to stop recording shell output\. If you press \fB^C\fR in a shell window, when the cursor is not at the end of the window, the shell is \fBkill\fRed\.
3069 .
3070 .P
3071 If you use Bash, you can hit: \fB^Q Up Arrow\fR and \fB^Q Down Arrow\fR to scroll through Bash\'s history buffer\. Other keys work as well: try \fB^Q ^A\fR to go to beginning of line or \fB^Q ^E\fR to go to end of line\. Unfortunately JOE only emulates a dumb terminal, so you have to use a lot of imagination to do any editing beyond hitting backspace\.
3072 .
3073 .P
3074 In general, any character quoted with \fB^Q\fR is sent to the shell\.
3075 .
3076 .P
3077 Also sent to the shell: \fBTab\fR, \fBBackspace\fR, \fBEnter\fR, \fB^C\fR and \fB^D\fR\.
3078 .
3079 .P
3080 \fI\fR
3081 .
3082 .SH "Pop\-up shell windows"
3083 Hit F1 \- F4 to open and switch between shell windows\.
3084 .
3085 .P
3086 Pop\-up shell windows use a full terminal emulator so that when you type "man ls" it\'s formatted correctly (it works well enough so that some interactive programs can be used)\. Even so, the shell window is still an edit buffer\.
3087 .
3088 .P
3089 The old shell window (with no terminal emulation) still exists: use \fB^K \'\fR to invoke it as usual\. This is useful to see control sequences emitted by a program\.
3090 .
3091 .P
3092 More of the keys get passed to the running program in pop\-up shell windows compared with the older one\. There is a :vtshell section of the joerc file to control which ones\. In particular arrow keys and Ctrl\-C are passed to the program\. It means you can easily step through bash history with the arrow keys, or abort programs the normal way with Ctrl\-C\.
3093 .
3094 .P
3095 On the other hand, loss of Ctrl\-C means it\'s less obvious how to close the window\. One way is to move the cursor off of the shell data entry point (with Ctrl\-P), and then hit Ctrl\-C\. Another is to hit \fB^K Q\fR\. Finally, you can type \'pop\' at the command prompt\.
3096 .
3097 .P
3098 If you need to pass a key to the shell that JOE normally uses, quote it\. For example, if you invoke "emacs \-nw" in the shell window, you can exit it with:
3099 .
3100 .IP "" 4
3101 .
3102 .nf
3103
3104 ^Q ^X ^C
3105 .
3106 .fi
3107 .
3108 .IP "" 0
3109 .
3110 .P
3111 To quickly position the cursor back to the point where data is entered into the shell, hit \fB^K V\fR\.
3112 .
3113 .P
3114 When you open a shell window, a JOE\-specific startup\-script is sourced\. It\'s located in /etc/joe/shell\.sh (also /etc/joe/shell\.csh)\. It contains some aliases which allow you to control JOE with fake shell commands\. I have these commands so far:
3115 .
3116 .IP "\(bu" 4
3117 clear
3118 .
3119 .br
3120 erase shell window (delete buffer contents)
3121 .
3122 .br
3123
3124 .
3125 .IP "\(bu" 4
3126 joe file
3127 .
3128 .br
3129 edit a file in JOE
3130 .
3131 .br
3132
3133 .
3134 .IP "\(bu" 4
3135 math 1+2
3136 .
3137 .br
3138 evaluate equation using JOE\'s calculator
3139 .
3140 .br
3141
3142 .
3143 .IP "\(bu" 4
3144 cd xyz
3145 .
3146 .br
3147 change directory, keep JOE up to date
3148 .
3149 .br
3150
3151 .
3152 .IP "\(bu" 4
3153 markb
3154 .
3155 .br
3156 same as ^KB
3157 .
3158 .br
3159
3160 .
3161 .IP "\(bu" 4
3162 markk
3163 .
3164 .br
3165 same as ^KK
3166 .
3167 .br
3168
3169 .
3170 .IP "\(bu" 4
3171 mark command
3172 .
3173 .br
3174 execute shell command, mark it\'s output
3175 .
3176 .br
3177
3178 .
3179 .IP "\(bu" 4
3180 parse command
3181 .
3182 .br
3183 execute shell command, parse it\'s output for file names and line numbers (for find or grep)
3184 .
3185 .br
3186
3187 .
3188 .IP "\(bu" 4
3189 parser comman
3190 .
3191 .br
3192 execute shell command, parse it\'s output for errors (for gcc)
3193 .
3194 .br
3195
3196 .
3197 .IP "\(bu" 4
3198 release
3199 .
3200 .br
3201 release parsed errors
3202 .
3203 .br
3204
3205 .
3206 .IP "\(bu" 4
3207 pop
3208 .
3209 .br
3210 dismiss shell window (same as ^K Q)
3211 .
3212 .br
3213
3214 .
3215 .IP "" 0
3216 .
3217 .P
3218 These work by emitting an escape sequence recognized by the terminal emulator: \fBEsc { joe_macro }\fR\. When this is received, the macro is executed\. For security, only macros defined in the joerc file which begin with "shell_" can be executed this way\.
3219 .
3220 .SS "Use cases"
3221 Pop\-up shell windows have a number of nice use cases:
3222 .
3223 .IP "\(bu" 4
3224 Use it to browse manual pages
3225 .
3226 .IP
3227 Hit F1 and type "man fopen"\. Use \'b\' (\'u\') and space to control \fImore\fR (or \fIless\fR) while viewing the manual\. You can leave the manual on the screen in one window while editing in another window\.
3228 .
3229 .IP "\(bu" 4
3230 Use it to switch directories
3231 .
3232 .IP
3233 Hit F1 and navigate to the directory while using \fIcd\fR\. Once you are in the right place, hit \fB^K E\fR to load a file (or type "edit file" from the shell)\.
3234 .
3235 .IP "\(bu" 4
3236 Use it in conjunction with the error parser to find files
3237 .
3238 .IP
3239 Hit F1 and navigate to a directory\. Use grep or find (or both) to generate a list of files):
3240 .
3241 .IP "" 0
3242 .
3243 .IP "" 4
3244 .
3245 .nf
3246
3247 parse grep \-n FIXME *\.c
3248 .
3249 .fi
3250 .
3251 .IP "" 0
3252 .
3253 .P
3254 Or:
3255 .
3256 .IP "" 4
3257 .
3258 .nf
3259
3260 markb; find \. | xargs grep \-n FIXME; markk; parse
3261 .
3262 .fi
3263 .
3264 .IP "" 0
3265 .
3266 .P
3267 (Note that you can\'t say this:
3268 .
3269 .IP "" 4
3270 .
3271 .nf
3272
3273 parse find \. | xargs grep \-n FIXME
3274 .
3275 .fi
3276 .
3277 .IP "" 0
3278 .
3279 .P
3280 \&\.\.\.the issue is that only the words to the left of the pipe symbol are passed as arguments to the parse command)\.
3281 .
3282 .P
3283 Now use \fB^P\fR to position the cursor on one of the lines of the list\. Hit \fBEsc Space\fR to have JOE edit the file and jump to the specified line (also you can use \fBEsc \-\fR and \fBEsc =\fR to step through the list)\.
3284 .
3285 .IP "\(bu" 4
3286 Use it in conjunction with search and replace to edit many files
3287 .
3288 .IP
3289 Once JOE has a list of files (from above), use search and replace with the \'e\' option to visit all of them:
3290 .
3291 .IP "" 0
3292 .
3293 .IP "" 4
3294 .
3295 .nf
3296
3297 ^K F
3298 Find: <text>
3299 Options: re
3300 Replace: <replacement text>
3301 .
3302 .fi
3303 .
3304 .IP "" 0
3305 .
3306 .IP "\(bu" 4
3307 Build your project
3308 .
3309 .IP "" 0
3310 .
3311 .P
3312 Easily capture errors from a build with:
3313 .
3314 .IP "" 4
3315 .
3316 .nf
3317
3318 parserr make
3319 .
3320 .fi
3321 .
3322 .IP "" 0
3323 .
3324 .P
3325 Hit \fBEsc =\fR and \fBEsc \-\fR to step through the errors\.
3326 .
3327 .SS "How it works\.\."
3328 .
3329 .IP "\(bu" 4
3330 There is a new mode "ansi"\. (\fBEsc X\fR mode ansi)\. When this mode is enabled, the screen updater hides escape sequences which are in the buffer\. Otherwise you get a big mess from the sequences surrounding colored output from \'ls\'\.
3331 .
3332 .IP "\(bu" 4
3333 There is a new built\-in syntax: "ansi"\. (\fB^T Y\fR ansi)\. This syntax parses the ANSI color control sequences so that text gets colored\.
3334 .
3335 .IP "\(bu" 4
3336 There is a terminal emulator to interpret control sequences from the shell program\. It emulates a terminal by modifying the contents of an edit buffer\.
3337 .
3338 .IP "\(bu" 4
3339 When the edit window is resized we tell the shell by issuing the TIOCSSIZE or TIOCSWINSZ ioctl\. This way, the program running in the shell knows the window size\.
3340 .
3341 .IP "" 0
3342 .
3343 .SH "Compiler and grep/find parsers"
3344 JOE has two parsers which can be used to generate the error list (list of file names / line numbers)\.
3345 .
3346 .P
3347 The "parserr" command parses the entire buffer, or if the block is set, just the highighted block for compiler error messages\. The messages should be in this format:
3348 .
3349 .IP "" 4
3350 .
3351 .nf
3352
3353 <junk> file\.name <junk> line\-number <junk> : <junk>
3354 .
3355 .fi
3356 .
3357 .IP "" 0
3358 .
3359 .P
3360 The file name needs to be made of numbers, letters, \'/\', \'\.\' and \'\-\'\. It must have at leat one \'\.\' in it\. There needs to be a colon somewhere after the line number\. Lines not in this format are ignored\.
3361 .
3362 .P
3363 The "gparse\' command parses the entire buffer, or if the block is set, just the highlighted block for a list of filenames or filenames with line numbers from "grep \-n", "find" and similar programs\.
3364 .
3365 .IP "" 4
3366 .
3367 .nf
3368
3369 filename
3370
3371 filename:<junk>
3372
3373 filename:line\-number:<junk>
3374 .
3375 .fi
3376 .
3377 .IP "" 0
3378 .
3379 .P
3380 Once JOE has the error list, there are a number of things you can do with it:
3381 .
3382 .IP "\(bu" 4
3383 Visit the files/locations in the list with \fBEsc \-\fR and \fBEsc =\fR
3384 .
3385 .IP "\(bu" 4
3386 Search and replace across all files in the list by using the \'e\' search and replace option\.
3387 .
3388 .IP "\(bu" 4
3389 Clear the list by using the "release" command\.
3390 .
3391 .IP "" 0
3392 .
3393 .P
3394 Also, you can use \fBEsc Space\fR (\'jump\' command) to parse the line the cursor is on and jump to the parsed filename and line number\. \'jump\' uses the grep/find parser unless \'parserr\' had been previously issued in the buffer\.
3395 .
3396 .SS "Grep\-find"
3397 Hit \fBEsc G\fR to bring up the prompt\. Enter a command which results in file names with line numbers, for example: \'grep \-n fred *\.c\'\. This will list all instances of \'fred\' in the *\.c files\. You need the \'\-n\' to get the line numbers\.
3398 .
3399 .P
3400 Now you can hit \fBEsc Space\fR on one of the lines to jump to the selected file\. Also, you can use \fBEsc =\fR and \fBEsc \-\fR to step through each line\.
3401 .
3402 .SS "Compile"
3403 Hit \fBEsc C\fR to save all modified files and then bring up the compile prompt\. Enter the command you want to use for the compiler (typically "make \-w")\. The compiler will run in a shell window\. When it\'s complete, the results are parsed\.
3404 .
3405 .P
3406 The \'\-w\' flag should be given to "make" so that it prints messages whenever it changes directories\. The message are in this format:
3407 .
3408 .IP "" 4
3409 .
3410 .nf
3411
3412 make[1]: Entering directory `/home/jhallen/joe\-editor\-mercurial/joe\'
3413 .
3414 .fi
3415 .
3416 .IP "" 0
3417 .
3418 .P
3419 If there are any errors or warnings from the compiler you can hit \fBEsc Space\fR on one of the lines to jump to the selected file\. Also, you can use \fBEsc =\fR and \fBEsc \-\fR to step through each line\.
3420 .
3421 .SH "Syntax highlighting"
3422 To enable highlight use \fB^T H\fR\.
3423 .
3424 .P
3425 To select the syntax, use \fB^T Y\fR\. You can hit \fBTab\fR \fBTab\fR at the prompt for a completion list\.
3426 .
3427 .P
3428 JOE tries to determine the syntax to use based on the name and contents of the file\. The configuration file /etc/joe/ftyperc contains the definitions\.
3429 .
3430 .P
3431 Each syntax is defined by a file located /usr/share/joe/syntax/\.
3432 .
3433 .SH "How JOE syntax highlighting works"
3434 \fIfrom c\.jsf \fIhttp://joe\-editor\.hg\.sourceforge\.net/hgweb/joe\-editor/joe\-editor/file/tip/syntax/c\.jsf\.in\fR, slightly modified\fR
3435 .
3436 .P
3437 A deterministic state machine that performs lexical analysis of the target language is provided in a syntax file\. (This is the "assembly language" of syntax highlighting\. A separate program could in principal be used to convert a regular expression NFA syntax into this format)\.
3438 .
3439 .P
3440 Each state begins with:
3441 .
3442 .IP "" 4
3443 .
3444 .nf
3445
3446 :<name> <color\-name> <context>
3447 .
3448 .fi
3449 .
3450 .IP "" 0
3451 .
3452 .P
3453 \fIname\e\fR is the state\'s name\.
3454 .
3455 .P
3456 \fIcolor\-name\e\fR is the color used for characters eaten by the state (really a symbol for a user definable color)\.
3457 .
3458 .P
3459 \fIcontext\e\fR tells JOE if the current character is part of a comment or a string\. This allows JOE to skip over comments and strings when matching characters such as parentheses\. To use this feature, the highlighter_context option must be applied to the files highlighted by the corresponding syntax\. To apply the option, add it to ftyperc for those file entries\.
3460 .
3461 .P
3462 The valid contexts are:
3463 .
3464 .IP "\(bu" 4
3465 comment This character is part of a comment\. Example: /* comment */
3466 .
3467 .IP "\(bu" 4
3468 string This character is part of a string\. Examples: "string" \'c\' \'string\'
3469 .
3470 .IP "" 0
3471 .
3472 .P
3473 The comment and string delimiters themselves should be marked with the appropriate context\. The context is considered to be part of the color, so the recolor=\-N and recolormark options apply the context to previous characters\.
3474 .
3475 .P
3476 The first state defined is the initial state\.
3477 .
3478 .P
3479 Within a state, define transitions (jumps) to other states\. Each jump has the form:
3480 .
3481 .IP "" 4
3482 .
3483 .nf
3484
3485 <character\-list> <target\-state\-name> [<option>s]
3486 .
3487 .fi
3488 .
3489 .IP "" 0
3490 .
3491 .P
3492 There are three ways to specify \fIcharacter\-list\e\fRs, either \fB*\fR for any character not otherwise specified, \fB%\fR or \fB&\fR to match the character in the delimiter match buffer (\fB%\fR matches the saved character exactly, while \fB&\fR matches the opposite character, for example ( will match ) when \fB&\fR is used) or a literal list of characters within quotes (ranges and escape sequences allowed: see \fIEscape Sequences\fR)\. When the next character matches any in the list, a jump to the target\-state is taken and the character is eaten (we advance to the next character of the file to be colored)\.
3493 .
3494 .P
3495 The * transition should be the first transition specified in the state\.
3496 .
3497 .P
3498 There are several options:
3499 .
3500 .IP "\(bu" 4
3501 \fBnoeat\fR \- Do not eat the character, instead feed it to the next state (this tends to make the states smaller, but be careful: you can make infinite loops)\. \'noeat\' implies \'recolor=\-1\'\.
3502 .
3503 .IP "\(bu" 4
3504 \fBrecolor=\-N\fR \- Recolor the past N characters with the color of the target\-state\. For example once /* is recognized as the start of C comment, you want to color the /* with the C comment color with recolor=\-2\.
3505 .
3506 .IP "\(bu" 4
3507 \fBmark\fR \- Mark beginning of a region with current position\.
3508 .
3509 .IP "\(bu" 4
3510 \fBmarkend\fR \- Mark end of region\.
3511 .
3512 .IP "\(bu" 4
3513 \fBrecolormark\fR \- Recolor all of the characters in the marked region with the color of the target\-state\. If markend is not given, all of the characters up to the current position are recolored\. Note that the marked region can not cross line boundaries and must be on the same line as recolormark\.
3514 .
3515 .IP "\(bu" 4
3516 \fBbuffer\fR \- Start copying characters to a string buffer, beginning with this one (it\'s OK to not terminate buffering with a matching \'strings\', \'istrings\' or \'hold\' option\- the buffer is limited to leading 23 characters)\.
3517 .
3518 .IP "\(bu" 4
3519 \fBsave_c\fR \- Save character in delimiter match buffer\.
3520 .
3521 .IP "\(bu" 4
3522 \fBsave_s\fR \- Copy string buffer to delimiter match buffer\.
3523 .
3524 .IP "\(bu" 4
3525 \fBstrings\fR \- A list of strings follows\. If the buffer matches any of the given strings, a jump to the target\-state in the string list is taken instead of the normal jump\.
3526 .
3527 .IP "\(bu" 4
3528 \fBistrings\fR \- Same as strings, but case is ignored\. Note: strings and istrings should be the last option on the line\. They cause any options which follow them to be ignored\.
3529 .
3530 .IP "\(bu" 4
3531 \fBhold\fR \- Stop buffering string\- a future \'strings\' or \'istrings\' will look at contents of buffer at this point\. Useful for distinguishing commands and function calls in some languages \'write 7\' is a command \'write (\' is a function call\- hold lets us stop at the space and delay the string lookup until the ( or 7\.
3532 .
3533 .IP "" 0
3534 .
3535 .P
3536 The format of the string list is:
3537 .
3538 .IP "" 4
3539 .
3540 .nf
3541
3542 "string" <target\-state> [<options>s]
3543 "string" <target\-state> [<options>s]
3544 "&" <target\-state> [<options>s] # matches contents of delimiter match buffer
3545 done
3546 .
3547 .fi
3548 .
3549 .IP "" 0
3550 .
3551 .P
3552 (all of the options above are allowed except "strings", "istrings" and "noeat"\. noeat is always implied after a matched string)\.
3553 .
3554 .P
3555 Weirdness: only states have colors, not transitions\. This means that you sometimes have to make dummy states with
3556 .
3557 .IP "" 4
3558 .
3559 .nf
3560
3561 * <next\-state> noeat
3562 .
3563 .fi
3564 .
3565 .IP "" 0
3566 .
3567 .P
3568 just to get a color specification\.
3569 .
3570 .P
3571 Delimiter match buffer is for perl and shell: a regex in perl can be s<\.\.>(\.\.\.) and in shell you can say: <<EOS \.\.\.\.\.\.\. EOS\. The idea is that you capture the first delimiter into the match buffer (the < or first "EOS") and then match it to the second one with "&" in a string or character list\.
3572 .
3573 .SS "Subroutines"
3574 Highlighter state machines can now make subroutine calls\. This works by template instantiation: the called state machine is included in your current state machine, but is modified so that the return address points to the called\. There is still no run\-time stack (the state is represented as a single integer plus the saved delimiter string)\.
3575 .
3576 .P
3577 Recursion is allowed, but is self limited to 5 levels\.
3578 .
3579 .P
3580 \fBNote:\fR this recursion limit is obsolete\. Subroutines now do use a stack so the call\-depth is limitless\.
3581 .
3582 .P
3583 To call a subroutine, use the \'call\' option:
3584 .
3585 .IP "" 4
3586 .
3587 .nf
3588
3589 "\e"" fred call=string(dquote)
3590 .
3591 .fi
3592 .
3593 .IP "" 0
3594 .
3595 .P
3596 The subroutine called \'string\' is called and the jump to \'fred\' is ignored\. The \'dquote\' option is passed to the subroutine\.
3597 .
3598 .P
3599 If you use recolor along with call, the color used is that of the first state of the subroutine\.
3600 .
3601 .P
3602 The subroutine itself returns to the caller like this:
3603 .
3604 .IP "" 4
3605 .
3606 .nf
3607
3608 "\e"" whatever return
3609 .
3610 .fi
3611 .
3612 .IP "" 0
3613 .
3614 .P
3615 If we\'re in a subroutine, it returns to the target state of the call ("fred" in the above example)\. If we\'re not in a subroutine, it jumps to "whatever"\.
3616 .
3617 .P
3618 If you use recolor along with return, the color used is from the returned state ("fred" in the example above)\.
3619 .
3620 .P
3621 There are several ways of delimiting subroutines which show up in how it is called\. Here are the options:
3622 .
3623 .IP "\(bu" 4
3624 \fBcall=string()\fR \- A file called string\.jsf is the subroutine\. The entire file is the subroutine\. The starting point is the first state in the file\.
3625 .
3626 .IP "\(bu" 4
3627 \fBcall=library\.string()\fR \- A file called library\.jsf has the subroutine\. The subroutine within the file is called string\.
3628 .
3629 .IP "\(bu" 4
3630 \fBcall=\.string()\fR \- There is a subroutine called string in the current file\.
3631 .
3632 .IP "" 0
3633 .
3634 .P
3635 When a subroutine is within a file, but is not the whole file, it is delimited as follows:
3636 .
3637 .IP "" 4
3638 .
3639 .nf
3640
3641 \&\.subr string
3642
3643 \. \. \. states for string subroutine \. \. \.
3644
3645 \.end
3646 .
3647 .fi
3648 .
3649 .IP "" 0
3650 .
3651 .P
3652 Option flags can be passed to subroutines which control preprocessor\-like directives\. For example:
3653 .
3654 .IP "" 4
3655 .
3656 .nf
3657
3658 \&\.ifdef dquote
3659 "\e"" idle return
3660 \.endif
3661 \.ifdef squote
3662 "\'" idle return
3663 \.endif
3664 .
3665 .fi
3666 .
3667 .IP "" 0
3668 .
3669 .P
3670 \&\.else is also available\. \.ifdefs can be nested\.
3671 .
3672 .P
3673 \fI\fR
3674 .
3675 .SH "The joerc file"
3676 \fB^T\fR options, the help screens and the key\-sequence to editor command bindings are all defined in JOE\'s initialization file\. If you make a copy of this file (which normally resides in \fB/etc/joe/joerc\fR) to \fB$HOME/\.joerc\fR, you can customize these setting to your liking\. The syntax of the initialization file should be fairly obvious and there are further instructions in it\.
3677 .
3678 .P
3679 The \fBjoerc\fR file has a directive to include another file (:include)\. This facility is used to include a file called \fBftyperc\fR (usually located in \fB/etc/joe/ftyperc\fR)\. \fBftyperc\fR has the file type table which determines which local options (including syntax for the highlighter) are applied to each file type\.
3680 .
3681 .SS "Initialization file loading sequence"
3682 If the path for an initialization file begins with \'/\' (you can specify this with the include directive), JOE only tries to load it from the absolute path\. Otherwise, JOE tries to load initialization files (the joerc file and any files included in it, typically ftyperc) from three places:
3683 .
3684 .IP "\(bu" 4
3685 "$HOME/\.joerc" \- The user\'s personalized joerc file\.
3686 .
3687 .IP "\(bu" 4
3688 "/etc/joe/joerc" \- The system\'s joerc file\. The exact path is fixed during the build, and is determined by the \-\-sysconfdir configure script option\.
3689 .
3690 .IP "\(bu" 4
3691 "*joerc" \- Built\-in file This means JOE searches for the file in a table of files linked in with the JOE binary (they are in the builtins\.c file)\. A built\-in joerc file is provided so that the editor will run in cases where system\'s joerc is inaccessible\.
3692 .
3693 .IP "" 0
3694 .
3695 .P
3696 If the system\'s joerc file is newer than the user\'s joerc file, JOE will print a warning in the startup log\. Previous versions of JOE would prompt the user for this case\- the idea was that JOE may be unusable with an out of date initialization file\.
3697 .
3698 .SS "joerc file sections"
3699 The \fBjoerc\fR file is broken up into a number of sections:
3700 .
3701 .IP "\(bu" 4
3702 Global options Options which are not file specific, like \fBnoxon\fR\.
3703 .
3704 .IP "\(bu" 4
3705 File name and content dependent options Options which depend on the file type, such as \fBautoindent\fR\. The \fBftyperc\fR file is included in this section\.
3706 .
3707 .IP "\(bu" 4
3708 \fB^T\fR menu system definition Use :defmenu to define a named menu of macros\. The \fBmenu\fR command brings up a specific named menu\. \fB^T\fR is a macro which brings up the root menu: \fBmenu,"root",rtn\fR\.
3709 .
3710 .IP "\(bu" 4
3711 Help screen contents Each help screen is named\. The name is used to implement context dependent help\.
3712 .
3713 .IP "\(bu" 4
3714 Key bindings Key binding tables are defined\. You can define as many as you like (you can switch to a specific one with the \fBkeymap\fR command), but the following must be provided:
3715 .
3716 .IP "\(bu" 4
3717 \fBmain\fR Editing windows
3718 .
3719 .IP "\(bu" 4
3720 \fBprompt\fR Prompt windows
3721 .
3722 .IP "\(bu" 4
3723 \fBquery\fR Single\-character query prompts
3724 .
3725 .IP "\(bu" 4
3726 \fBquerya\fR Single\-character query for quote
3727 .
3728 .IP "\(bu" 4
3729 \fBquerysr\fR Single\-character query for search and replace
3730 .
3731 .IP "\(bu" 4
3732 \fBshell\fR Shell windows
3733 .
3734 .IP "\(bu" 4
3735 \fBvtshell\fR Terminal emulator shell windows
3736 .
3737 .IP "" 0
3738
3739 .
3740 .IP "" 0
3741 .
3742 .P
3743 Key binding tables can inherit bindings from already defined tables\. This allows you to group common key bindings into a single table which is inherited by the others\.
3744 .
3745 .SS "Mode command"
3746 Many options can be controlled with the \fB^T\fR menu\. This menu is defined in the joerc file\. Each option in the \fB^T\fR menu just executes a macro\. Usually the macro is the mode command\. You can execute the mode command directly with:
3747 .
3748 .IP "" 4
3749 .
3750 .nf
3751
3752 Esc X mode <enter>
3753 .
3754 .fi
3755 .
3756 .IP "" 0
3757 .
3758 .P
3759 Hit \fBTab\fR \fBTab\fR for a completion list of all options\.
3760 .
3761 .SS "Menu command"
3762 This command calls up a named menu of macros which was defined in the \fBjoerc\fR file\.
3763 .
3764 .IP "" 4
3765 .
3766 .nf
3767
3768 Esc X menu <enter>
3769 .
3770 .fi
3771 .
3772 .IP "" 0
3773 .
3774 .P
3775 As usual, hit \fBTab\fR \fBTab\fR at the prompt for a completion list of the menus which exist\.
3776 .
3777 .P
3778 \fB^T\fR is bound to the simple macro \fBmenu,"root",rtn\fR\- it brings up the root of the options menu system\.
3779 .
3780 .SH "Xterm Mouse support"
3781 There are two levels of mouse support\. The \-mouse option enables the first level, which will work with any stock Xterm\. If \-joexterm is also set, mouse support is enhanced, but you need a recent version of XTerm, and it needs to be \./configured with the \-\-enable\-paste64 option\.
3782 .
3783 .P
3784 When \-mouse is set, you can:
3785 .
3786 .IP "\(bu" 4
3787 Left\-click in a text window to set the cursor position\. Left\-click in a different window to move the cursor to a different window\.
3788 .
3789 .IP "\(bu" 4
3790 Select text with the mouse\. Left\-click and drag to select some text\- it will be as if you had used \fB^K B\fR and \fB^K K\fR to mark it\. Left\-click (but don\'t drag) to position the cursor somewhere else\. Middle click to copy the selected text to the cursor\- it will be as if you had hit \fB^K C\fR\. If you drag past the edge of the text window, the window will auto\-scroll to select more text\. Unfortunately, Xterm does not send any codes when the cursor is outside of the Xterm frame itself, so this only works if the mouse is still contained within the Xterm frame\. I\'ve sent a patch to the Xterm maintainer to improve this, but he has not taken it yet\.
3791 .
3792 .IP "\(bu" 4
3793 Resize windows with the mouse: click and hold on a status line dividing two windows to move it\.
3794 .
3795 .IP "\(bu" 4
3796 Select menu entries (such as any completion menu or the \fB^T\fR options menu): click on the menu item to position the cursor on it\. Double\-click on a menu item to select it (same as hitting return with cursor on it)\.
3797 .
3798 .IP "\(bu" 4
3799 If your mouse has a wheel, turning the wheel will scroll the window with the cursor\.
3800 .
3801 .IP "" 0
3802 .
3803 .P
3804 Unfortunately, when \-mouse is selected, cut and paste between X windows does not work as it normally does in a shell window (left\-click and drag to select, middle click to paste)\. Instead, you have to hold the shift key down to do this: shift\-left\-click and drag to select, and shift\-middle click to paste\. Note that pasting text into JOE this way has problems: any ` characters will get messed up because ` means quote the following control character\. Also if auto\-indent is enabled, pasted text will not be indented properly\.
3805 .
3806 .P
3807 \fBNote:\fR these problems with pasting have been resolved in recent versions of JOE\.
3808 .
3809 .IP "\(bu" 4
3810 JOE enables "bracketed paste" mode in Xterm so that pasted text is bracketed with an escape sequence\. This sequence causes JOE to disable the autoindent, wordwrap and spaces modes for the paste, and restores them when the paste is complete\.
3811 .
3812 .IP "\(bu" 4
3813 Even if the terminal emulator does not have this bracketed paste mode, JOE detects pasted text by timing: If text arrives all at once (all in the same buffer), the text is assumed to be pasted text and autoindent and wordwrap are temporarily disabled\.
3814 .
3815 .IP "" 0
3816 .
3817 .P
3818 When \-joexterm is set (and you have \./configured Xterm with \-\-enable\-paste64):
3819 .
3820 .IP "\(bu" 4
3821 Cut & paste are properly integrated with X\. Text selected with left\-click\-drag is available for pasting into other X windows (even if the selected text is larger than the text window)\. Text selected in other X windows can be pasted into JOE with middle\-click\. There are no problems pasting text containing ` or with auto\-indent\.
3822 .
3823 .IP "" 0
3824 .
3825 .P
3826 \-\-enable\-paste64 allows an application program to communicate Base\-64 encoded selection data to and from the Xterm\. The program has full control over what is in the selection data and when it is received or sent\.
3827 .
3828 .SH "Color Xterm support"
3829 JOE can make use of monochrome Xterm, 8\-color Xterm, 16\-color Xterm, 88\-color Xterm and 256\-color Xterm\. The number of colors which Xterm supports is determined by which "configure" script options are set before the Xterm source code is compiled\. The termcap or terminfo entry must support how your Xterm is configured\. On my Slackware Linux distribution, you have to set the TERM environment variable to one of these:
3830 .
3831 .IP "\(bu" 4
3832 xterm
3833 .
3834 .IP "\(bu" 4
3835 xterm\-color
3836 .
3837 .IP "\(bu" 4
3838 xterm\-16color
3839 .
3840 .IP "\(bu" 4
3841 xterm\-88color
3842 .
3843 .IP "\(bu" 4
3844 xterm\-256color
3845 .
3846 .IP "" 0
3847 .
3848 .P
3849 If the termcap/terminfo entry is missing, you can add the "\-assume_256color" option to the joerc file\. Note that this was broken for terminfo in versions of JOE below 3\.4\.
3850 .
3851 .P
3852 When it is working, the command: "joe \-assume_256color \-text_color bg_222" should have a gray background\.
3853 .
3854 .SH "Hex edit mode"
3855 When this mode is selected (either put \-hex on the command line, or look for "Hex edit mode" after hitting \fB^T\fR), the buffer is displayed as a hex dump, but all of the editing commands operate the same way\. It is most useful to select overtype mode in conjunction with hex dump (hit \fB^T T\fR)\. Then typing will not insert\.
3856 .
3857 .IP "\(bu" 4
3858 To enter the hex byte 0xF8 type \fB^Q x F 8\fR
3859 .
3860 .IP "\(bu" 4
3861 You can use \fB^K C\fR to copy a block as usual\. If overtype mode is selected, the block will overwrite the destination data without changing the size of the file\. Otherwise it inserts\.
3862 .
3863 .IP "\(bu" 4
3864 Hit \fBEsc X byte <Enter>\fR, to jump to a particular byte offset\. Hex values can be entered into this prompt like this: 0x2000\.
3865 .
3866 .IP "\(bu" 4
3867 Search, incremental search, and search & replace all operate as usual\.
3868 .
3869 .IP "" 0
3870 .
3871 .P
3872 \fI\fR
3873 .
3874 .SH "Environment variables"
3875 For JOE to operate correctly, a number of other environment settings must be correct\. The throughput (baud rate) of the connection between the computer and your terminal must be set correctly for JOE to update the screen smoothly and allow typeahead to defer the screen update\. Use the \fBstty nnn\fR command to set this\. You want to set it as close as possible to actual throughput of the connection\. For example, if you are connected via a 1200 baud modem, you want to use this value for \fBstty\fR\. If you are connected via 14\.4k modem, but the terminal server you are connected to connects to the computer a 9600 baud, you want to set your speed as 9600 baud\. The special baud rate of 38400 or \fBextb\fR is used to indicate that you have a very\-high speed connection, such as a memory mapped console or an X\-window terminal emulator\. If you can\'t use \fBstty\fR to set the actual throughput (perhaps because of a modem communicating with the computer at a different rate than it\'s communicating over the phone line), you can put a numeric value in the \fBBAUD\fR environment variable instead (use \fBsetenv BAUD 9600\fR for csh or \fBBAUD=9600; export BAUD\fR for sh)\.
3876 .
3877 .P
3878 The \fBTERM\fR environment variable must be set to the type of terminal you\'re using\. If the size (number of lines/columns) of your terminal is different from what is reported in the TERMCAP or TERMINFO entry, you can set this with the \fBstty rows nn cols nn\fR command, or by setting the \fBLINES\fR and \fBCOLUMNS\fR environment variables\. The terminal size is variable on modern systems and is determined by an ioctl, so these parameters often have no effect\.
3879 .
3880 .P
3881 JOE normally expects that flow control between the computer and your terminal to use \fB^S\fR/\fB^Q\fR handshaking (i\.e\., if the computer is sending characters too fast for your terminal, your terminal sends \fB^S\fR to stop the output and \fB^Q\fR to restart it)\. If the flow control uses out\-of\-band or hardware handshaking or if your terminal is fast enough to always keep up with the computer output and you wish to map \fB^S\fR/\fB^Q\fR to edit commands, you can set the environment variable \fBNOXON\fR to have JOE attempt to turn off \fB^S\fR/\fB^Q\fR handshaking\. If the connection between the computer and your terminal uses no handshaking and your terminal is not fast enough to keep up with the output of the computer, you can set the environment variable \fBDOPADDING\fR to have \fBJOE\fR slow down the output by interspersing PAD characters between the terminal screen update sequences\.
3882 .
3883 .P
3884 Here is a complete list of the environment variables:
3885 .
3886 .IP "\(bu" 4
3887 BAUD
3888 .
3889 .br
3890 Tell JOE the baud rate of the terminal (overrides value reported by stty)\.
3891 .
3892 .br
3893
3894 .
3895 .IP "\(bu" 4
3896 COLUMNS
3897 .
3898 .br
3899 Set number of columns in terminal emulator (in case termcap entry is wrong)\. This is only useful on old system which don\'t have the "get window size" ioctl\.
3900 .
3901 .br
3902
3903 .
3904 .IP "\(bu" 4
3905 DOPADDING
3906 .
3907 .br
3908 Enable JOE to send padding NULs to the terminal when set (for very old terminals)\.
3909 .
3910 .br
3911
3912 .
3913 .IP "\(bu" 4
3914 HOME
3915 .
3916 .br
3917 Used to get path to home directory for ~ expansion and also to find ~/\.joerc file ~/\.joe directory\.
3918 .
3919 .br
3920
3921 .
3922 .IP "\(bu" 4
3923 HOSTNAME
3924 .
3925 .br
3926 Used to get hostname to put in EMACS compatible locks\.
3927 .
3928 .br
3929
3930 .
3931 .IP "\(bu" 4
3932 JOETERM
3933 .
3934 .br
3935 Gives terminal type: JOE will use this instead of TERM if it\'s set\.
3936 .
3937 .br
3938
3939 .
3940 .IP "\(bu" 4
3941 LANG
3942 .
3943 .br
3944 Sets locale (like en_US\.utf\-8)\. JOE uses the first of these which is set: LC_ALL, LC_CTYPE, LANG\.
3945 .
3946 .br
3947
3948 .
3949 .IP "\(bu" 4
3950 LC_ALL
3951 .
3952 .br
3953 Sets locale (like en_US\.utf\-8)\. JOE uses the first of these which is set: LC_ALL, LC_CTYPE, LANG\.
3954 .
3955 .br
3956
3957 .
3958 .IP "\(bu" 4
3959 LC_CTYPE
3960 .
3961 .br
3962 Sets locale (like en_US\.utf\-8)\. JOE uses the first of these which is set: LC_ALL, LC_CTYPE, LANG\.
3963 .
3964 .br
3965
3966 .
3967 .IP "\(bu" 4
3968 LINES
3969 .
3970 .br
3971 Set number of lines in terminal emulator (in case termcap entry is wrong)\. This is only useful on old system which don\'t have the "get window size" ioctl\.
3972 .
3973 .br
3974
3975 .
3976 .IP "\(bu" 4
3977 NOXON
3978 .
3979 .br
3980 Disable \fB^S\fR and \fB^Q\fR flow control, possibly allowing \fB^S\fR and \fB^Q\fR to be used as editor keys\.
3981 .
3982 .br
3983
3984 .
3985 .IP "\(bu" 4
3986 SHELL
3987 .
3988 .br
3989 Path to shell (like /bin/sh)\. This is used in several places: If you are on a system with no job control, this shell is invoked when you hit \fB^K Z\fR\. Also this is the shell which is run in shell windows\. If SHELL is not set (Cygwin) or if it\'s set to /bin/sh, JOE invokes the first of these which exists: /bin/bash, /usr/bin/bash, /bin/sh\.
3990 .
3991 .br
3992
3993 .
3994 .IP "\(bu" 4
3995 SIMPLE_BACKUP_SUFFIX
3996 .
3997 .br
3998 If this is set, it is appended to the file name instead of ~ to create the backup file name\.
3999 .
4000 .br
4001
4002 .
4003 .IP "\(bu" 4
4004 TAGS
4005 .
4006 .br
4007 If set to a path to a file, JOE tries to use this as the "tags" file if there is no "tags" file in the current directory\.
4008 .
4009 .br
4010
4011 .
4012 .IP "\(bu" 4
4013 TEMP
4014 .
4015 .br
4016 If set, gives path to directory to open swapfile instead of /tmp
4017 .
4018 .br
4019
4020 .
4021 .IP "\(bu" 4
4022 TERMCAP
4023 .
4024 .br
4025 Used by JOE\'s built\-in termcap file parser (not used for terminfo)\. A termcap entry can be placed directly in this variable (which will be used if it matches TERM), or if it begins with /, it gives a list of paths to termcap files to search\.
4026 .
4027 .br
4028
4029 .
4030 .IP "\(bu" 4
4031 TERMPATH
4032 .
4033 .br
4034 Gives list of paths to termcap files to search when TERMCAP has a termcap entry (otherwise it\'s ignored)\. The default list of paths to termcap files (when TERMCAP and TERMPATH do not have it) is: "~/\.termcap /etc/joe/termcap /etc/termcap"
4035 .
4036 .br
4037
4038 .
4039 .IP "\(bu" 4
4040 TERM
4041 .
4042 .br
4043 Gives terminal type, like "vt100" or "xterm"\.
4044 .
4045 .br
4046
4047 .
4048 .IP "\(bu" 4
4049 USER
4050 .
4051 .br
4052 Used to get user name for EMACS compatible file locks\.
4053 .
4054 .br
4055
4056 .
4057 .IP "" 0
4058 .
4059 .P
4060 \fI\fR
4061 .
4062 .SH "JOE commands grouped by function"
4063 These commands can be entered at the \fBEsc X\fR prompt\.
4064 .
4065 .SS "Background programs"
4066 .
4067 .IP "\(bu" 4
4068 bknd
4069 .
4070 .br
4071 Run a shell in a window
4072 .
4073 .br
4074
4075 .
4076 .IP "\(bu" 4
4077 vtbknd
4078 .
4079 .br
4080 Run a shell in a terminal emulator window
4081 .
4082 .br
4083
4084 .
4085 .IP "\(bu" 4
4086 killproc
4087 .
4088 .br
4089 Kill program in current window
4090 .
4091 .br
4092
4093 .
4094 .IP "\(bu" 4
4095 run
4096 .
4097 .br
4098 Run a UNIX command in a window
4099 .
4100 .br
4101
4102 .
4103 .IP "\(bu" 4
4104 sys
4105 .
4106 .br
4107 Run a UNIX command and return to editor when done (I/O does not go through editor, but we get the command\'s return status)\.
4108 .
4109 .IP "" 0
4110 .
4111 .SS "Blocks"
4112 .
4113 .IP "\(bu" 4
4114 blkcpy
4115 .
4116 .br
4117 Copy marked block to cursor
4118 .
4119 .br
4120
4121 .
4122 .IP "\(bu" 4
4123 blkdel
4124 .
4125 .br
4126 Delete marked block
4127 .
4128 .br
4129
4130 .
4131 .IP "\(bu" 4
4132 blkmove
4133 .
4134 .br
4135 Move marked block to cursor
4136 .
4137 .br
4138
4139 .
4140 .IP "\(bu" 4
4141 blksave
4142 .
4143 .br
4144 Save marked block into a file
4145 .
4146 .br
4147
4148 .
4149 .IP "\(bu" 4
4150 copy
4151 .
4152 .br
4153 Copy block to kill\-ring
4154 .
4155 .br
4156
4157 .
4158 .IP "\(bu" 4
4159 drop
4160 .
4161 .br
4162 Set markb\. If it was already set, eliminate Ait\.
4163 .
4164 .br
4165
4166 .
4167 .IP "\(bu" 4
4168 dropon
4169 .
4170 .br
4171 Set markb\. If it was already set, eliminate it\. Turn on marking mode\.
4172 .
4173 .br
4174
4175 .
4176 .IP "\(bu" 4
4177 toggle_marking
4178 .
4179 .br
4180 If we\'re in a block: clear markb and markk\. If marking is off: set markb and turn on marking\. If marking is on: set markk (swap if necessary with markb) and turn marking off\.
4181 .
4182 .br
4183
4184 .
4185 .IP "\(bu" 4
4186 begin_marking
4187 .
4188 .br
4189 If we\'re on an edge of a block: set markb to other edge and turn on marking mode\. Otherwise set markb to cursor and turn on marking mode\.
4190 .
4191 .br
4192
4193 .
4194 .IP "\(bu" 4
4195 select
4196 .
4197 .br
4198 Set markb\. If it was already set, do nothing\.
4199 .
4200 .br
4201
4202 .
4203 .IP "\(bu" 4
4204 filt
4205 .
4206 .br
4207 Filter block or file through a UNIX command
4208 .
4209 .br
4210
4211 .
4212 .IP "\(bu" 4
4213 markb
4214 .
4215 .br
4216 Set beginning of block mark
4217 .
4218 .br
4219
4220 .
4221 .IP "\(bu" 4
4222 markk
4223 .
4224 .br
4225 Set end of block mark
4226 .
4227 .br
4228
4229 .
4230 .IP "\(bu" 4
4231 markl
4232 .
4233 .br
4234 Mark current line
4235 .
4236 .br
4237
4238 .
4239 .IP "\(bu" 4
4240 nmark
4241 .
4242 .br
4243 Eliminate markb and markk
4244 .
4245 .br
4246
4247 .
4248 .IP "\(bu" 4
4249 picokill
4250 .
4251 .br
4252 Delete line or block
4253 .
4254 .br
4255
4256 .
4257 .IP "\(bu" 4
4258 pop
4259 .
4260 .br
4261 Restore markb and markk values from stack
4262 .
4263 .br
4264
4265 .
4266 .IP "\(bu" 4
4267 psh
4268 .
4269 .br
4270 Push markb and markk values onto a stack
4271 .
4272 .br
4273
4274 .
4275 .IP "\(bu" 4
4276 swap
4277 .
4278 .br
4279 Switch cursor with markb
4280 .
4281 .br
4282
4283 .
4284 .IP "\(bu" 4
4285 tomarkb
4286 .
4287 .br
4288 Move cursor to markb
4289 .
4290 .br
4291
4292 .
4293 .IP "\(bu" 4
4294 tomarkbk
4295 .
4296 .br
4297 Move cursor to markb or markk
4298 .
4299 .br
4300
4301 .
4302 .IP "\(bu" 4
4303 tomarkk
4304 .
4305 .br
4306 Move cursor to markk
4307 .
4308 .br
4309
4310 .
4311 .IP "\(bu" 4
4312 yank
4313 .
4314 .br
4315 Insert top of kill ring
4316 .
4317 .br
4318
4319 .
4320 .IP "\(bu" 4
4321 yankpop
4322 .
4323 .br
4324 Scroll through kill ring
4325 .
4326 .br
4327
4328 .
4329 .IP "\(bu" 4
4330 yapp
4331 .
4332 .br
4333 Append next kill to top of kill ring
4334 .
4335 .br
4336
4337 .
4338 .IP "\(bu" 4
4339 upper
4340 .
4341 .br
4342 Convert everything in block to uppercase
4343 .
4344 .br
4345
4346 .
4347 .IP "\(bu" 4
4348 lower
4349 .
4350 .br
4351 Convert everything in block to lowercase
4352 .
4353 .IP "" 0
4354 .
4355 .SS "Buffers"
4356 .
4357 .IP "\(bu" 4
4358 bufed
4359 .
4360 .br
4361 Buffer menu
4362 .
4363 .br
4364
4365 .
4366 .IP "\(bu" 4
4367 edit
4368 .
4369 .br
4370 Load file into window: asks to reload if buffer exists
4371 .
4372 .br
4373
4374 .
4375 .IP "\(bu" 4
4376 switch
4377 .
4378 .br
4379 Load file into window: always uses buffer if it exists
4380 .
4381 .br
4382
4383 .
4384 .IP "\(bu" 4
4385 scratch
4386 .
4387 .br
4388 Push a scratch buffer into current window
4389 .
4390 .br
4391
4392 .
4393 .IP "\(bu" 4
4394 popabort
4395 .
4396 .br
4397 Abort and pop window from stack (do nothing if stack empty)
4398 .
4399 .br
4400
4401 .
4402 .IP "\(bu" 4
4403 nbuf
4404 .
4405 .br
4406 Load next buffer into current window
4407 .
4408 .br
4409
4410 .
4411 .IP "\(bu" 4
4412 pbuf
4413 .
4414 .br
4415 Load previous buffer into current window
4416 .
4417 .br
4418
4419 .
4420 .IP "\(bu" 4
4421 reload
4422 .
4423 .br
4424 Re\-read file into buffer (revert)
4425 .
4426 .br
4427
4428 .
4429 .IP "\(bu" 4
4430 reloadall
4431 .
4432 .br
4433 Re\-read all unmodified buffers
4434 .
4435 .IP "" 0
4436 .
4437 .SS "Cursor Motion"
4438 .
4439 .IP "\(bu" 4
4440 bof
4441 .
4442 .br
4443 Move cursor to beginning of file
4444 .
4445 .br
4446
4447 .
4448 .IP "\(bu" 4
4449 bol
4450 .
4451 .br
4452 Move cursor to beginning of line (always)
4453 .
4454 .br
4455
4456 .
4457 .IP "\(bu" 4
4458 bop
4459 .
4460 .br
4461 Move to beginning of a paragraph
4462 .
4463 .br
4464
4465 .
4466 .IP "\(bu" 4
4467 bos
4468 .
4469 .br
4470 Move to beginning of screen
4471 .
4472 .br
4473
4474 .
4475 .IP "\(bu" 4
4476 bkwdc
4477 .
4478 .br
4479 Search backwards for a character
4480 .
4481 .br
4482
4483 .
4484 .IP "\(bu" 4
4485 byte
4486 .
4487 .br
4488 Move cursor to specific byte offset into the file\.
4489 .
4490 .br
4491
4492 .
4493 .IP "\(bu" 4
4494 col
4495 .
4496 .br
4497 Move cursor to specific column number\.
4498 .
4499 .br
4500
4501 .
4502 .IP "\(bu" 4
4503 dnarw
4504 .
4505 .br
4506 Move cursor down one line
4507 .
4508 .br
4509
4510 .
4511 .IP "\(bu" 4
4512 eof
4513 .
4514 .br
4515 Move cursor to end of file
4516 .
4517 .br
4518
4519 .
4520 .IP "\(bu" 4
4521 eol
4522 .
4523 .br
4524 Move cursor to end of line
4525 .
4526 .br
4527
4528 .
4529 .IP "\(bu" 4
4530 eop
4531 .
4532 .br
4533 Move cursor to end of paragraph
4534 .
4535 .br
4536
4537 .
4538 .IP "\(bu" 4
4539 fwrdc
4540 .
4541 .br
4542 Search forward for matching character
4543 .
4544 .br
4545
4546 .
4547 .IP "\(bu" 4
4548 gomark
4549 .
4550 .br
4551 Move cursor to a bookmark
4552 .
4553 .br
4554
4555 .
4556 .IP "\(bu" 4
4557 home
4558 .
4559 .br
4560 Move cursor to beginning of line
4561 .
4562 .br
4563
4564 .
4565 .IP "\(bu" 4
4566 line
4567 .
4568 .br
4569 Move cursor to specified line
4570 .
4571 .br
4572
4573 .
4574 .IP "\(bu" 4
4575 ltarw
4576 .
4577 .br
4578 Move cursor left
4579 .
4580 .br
4581
4582 .
4583 .IP "\(bu" 4
4584 nedge
4585 .
4586 .br
4587 Move cursor to next edge
4588 .
4589 .br
4590
4591 .
4592 .IP "\(bu" 4
4593 nextpos
4594 .
4595 .br
4596 Move cursor to next position in cursor position history
4597 .
4598 .br
4599
4600 .
4601 .IP "\(bu" 4
4602 nextword
4603 .
4604 .br
4605 Move cursor to end of next word
4606 .
4607 .br
4608
4609 .
4610 .IP "\(bu" 4
4611 pedge
4612 .
4613 .br
4614 Move cursor to previous edge
4615 .
4616 .br
4617
4618 .
4619 .IP "\(bu" 4
4620 prevpos
4621 .
4622 .br
4623 Move cursor to previous position in cursor position history
4624 .
4625 .br
4626
4627 .
4628 .IP "\(bu" 4
4629 prevword
4630 .
4631 .br
4632 Move cursor to beginning of previous word
4633 .
4634 .br
4635
4636 .
4637 .IP "\(bu" 4
4638 rtarw
4639 .
4640 .br
4641 Move cursor right
4642 .
4643 .br
4644
4645 .
4646 .IP "\(bu" 4
4647 setmark
4648 .
4649 .br
4650 Set a bookmark
4651 .
4652 .br
4653
4654 .
4655 .IP "\(bu" 4
4656 tomatch
4657 .
4658 .br
4659 Move cursor to matching delimiter
4660 .
4661 .br
4662
4663 .
4664 .IP "\(bu" 4
4665 tos
4666 .
4667 .br
4668 Move cursor to top of screen
4669 .
4670 .br
4671
4672 .
4673 .IP "\(bu" 4
4674 uparw
4675 .
4676 .br
4677 Move cursor up
4678 .
4679 .IP "" 0
4680 .
4681 .SS "Deletion"
4682 .
4683 .IP "\(bu" 4
4684 backs
4685 .
4686 .br
4687 Backspace
4688 .
4689 .br
4690
4691 .
4692 .IP "\(bu" 4
4693 backw
4694 .
4695 .br
4696 Backspace a word
4697 .
4698 .br
4699
4700 .
4701 .IP "\(bu" 4
4702 delbol
4703 .
4704 .br
4705 Delete to beginning of line
4706 .
4707 .br
4708
4709 .
4710 .IP "\(bu" 4
4711 delch
4712 .
4713 .br
4714 Delete character under cursor
4715 .
4716 .br
4717
4718 .
4719 .IP "\(bu" 4
4720 deleol
4721 .
4722 .br
4723 Delete to end of line
4724 .
4725 .br
4726
4727 .
4728 .IP "\(bu" 4
4729 dellin
4730 .
4731 .br
4732 Delete entire line
4733 .
4734 .br
4735
4736 .
4737 .IP "\(bu" 4
4738 delw
4739 .
4740 .br
4741 Delete word to right
4742 .
4743 .IP "" 0
4744 .
4745 .SS "Error parsing"
4746 .
4747 .IP "\(bu" 4
4748 nxterr
4749 .
4750 .br
4751 Goto next parsed error
4752 .
4753 .br
4754
4755 .
4756 .IP "\(bu" 4
4757 parserr
4758 .
4759 .br
4760 Parse errors in current file
4761 .
4762 .br
4763
4764 .
4765 .IP "\(bu" 4
4766 gparse
4767 .
4768 .br
4769 Parse grep list in current file
4770 .
4771 .br
4772
4773 .
4774 .IP "\(bu" 4
4775 jump
4776 .
4777 .br
4778 Parse current line and jump to it
4779 .
4780 .br
4781
4782 .
4783 .IP "\(bu" 4
4784 prverr
4785 .
4786 .br
4787 Go to previous parsed error
4788 .
4789 .br
4790
4791 .
4792 .IP "\(bu" 4
4793 showerr
4794 .
4795 .br
4796 Show current message
4797 .
4798 .br
4799
4800 .
4801 .IP "\(bu" 4
4802 grep
4803 .
4804 .br
4805 Execute grep command, parse when done
4806 .
4807 .br
4808
4809 .
4810 .IP "\(bu" 4
4811 build
4812 .
4813 .br
4814 Execute build command, parse when done
4815 .
4816 .br
4817
4818 .
4819 .IP "\(bu" 4
4820 release
4821 .
4822 .br
4823 Release error/grep records
4824 .
4825 .IP "" 0
4826 .
4827 .SS "Exit"
4828 .
4829 .IP "\(bu" 4
4830 cancel
4831 .
4832 .br
4833 Like abort, but doesn\'t return failure: useful in macros to escape out of a prompt\.
4834 .
4835 .br
4836
4837 .
4838 .IP "\(bu" 4
4839 abort
4840 .
4841 .br
4842 Abort current buffer/window\. Prompt if it is changed\.
4843 .
4844 .br
4845
4846 .
4847 .IP "\(bu" 4
4848 abortbuf
4849 .
4850 .br
4851 Like above, but just fail if it would have to prompt because it\'s the last window on a modified buffer\.
4852 .
4853 .br
4854
4855 .
4856 .IP "\(bu" 4
4857 ask
4858 .
4859 .br
4860 Prompt to save current file: user says yes return, user says no: run \'abort\'\. Use in a macro: "ask,query,exsave"
4861 .
4862 .br
4863
4864 .
4865 .IP "\(bu" 4
4866 exsave
4867 .
4868 .br
4869 Save file and exit
4870 .
4871 .br
4872
4873 .
4874 .IP "\(bu" 4
4875 lose
4876 .
4877 .br
4878 EMACS kill buffer\. The buffer is deleted\- any windows with it get a replacement scratch buffer\.
4879 .
4880 .br
4881
4882 .
4883 .IP "\(bu" 4
4884 querysave
4885 .
4886 .br
4887 Prompt to save each modified buffer\. Use in a macro: "querysave,query,killjoe"
4888 .
4889 .br
4890
4891 .
4892 .IP "\(bu" 4
4893 killjoe
4894 .
4895 .br
4896 Exit JOE immediately without checking for modified buffers
4897 .
4898 .IP "" 0
4899 .
4900 .SS "Files"
4901 .
4902 .IP "\(bu" 4
4903 cd
4904 .
4905 .br
4906 Set directory prefix
4907 .
4908 .br
4909
4910 .
4911 .IP "\(bu" 4
4912 save
4913 .
4914 .br
4915 Save file
4916 .
4917 .br
4918
4919 .
4920 .IP "\(bu" 4
4921 savenow
4922 .
4923 .br
4924 Save immediately, unless file name is not known
4925 .
4926 .br
4927
4928 .
4929 .IP "\(bu" 4
4930 insf
4931 .
4932 .br
4933 Insert a file
4934 .
4935 .IP "" 0
4936 .
4937 .SS "Formatting"
4938 .
4939 .IP "\(bu" 4
4940 center
4941 .
4942 .br
4943 Center line
4944 .
4945 .br
4946
4947 .
4948 .IP "\(bu" 4
4949 fmtblk
4950 .
4951 .br
4952 Format all paragraphs in a block
4953 .
4954 .br
4955
4956 .
4957 .IP "\(bu" 4
4958 format
4959 .
4960 .br
4961 Format current paragraph
4962 .
4963 .br
4964
4965 .
4966 .IP "\(bu" 4
4967 lindent
4968 .
4969 .br
4970 Indent to the left
4971 .
4972 .br
4973
4974 .
4975 .IP "\(bu" 4
4976 rindent
4977 .
4978 .br
4979 Indent to the right
4980 .
4981 .IP "" 0
4982 .
4983 .SS "Help"
4984 .
4985 .IP "\(bu" 4
4986 help
4987 .
4988 .br
4989 Turn help on or off
4990 .
4991 .br
4992
4993 .
4994 .IP "\(bu" 4
4995 hnext
4996 .
4997 .br
4998 Switch to next help screen
4999 .
5000 .br
5001
5002 .
5003 .IP "\(bu" 4
5004 hprev
5005 .
5006 .br
5007 Switch to previous help screen
5008 .
5009 .IP "" 0
5010 .
5011 .SS "Inserting"
5012 .
5013 .IP "\(bu" 4
5014 ctrl
5015 .
5016 .br
5017 Type next key
5018 .
5019 .br
5020
5021 .
5022 .IP "\(bu" 4
5023 finish
5024 .
5025 .br
5026 Complete word in text window
5027 .
5028 .br
5029
5030 .
5031 .IP "\(bu" 4
5032 insc
5033 .
5034 .br
5035 Insert a space
5036 .
5037 .br
5038
5039 .
5040 .IP "\(bu" 4
5041 open
5042 .
5043 .br
5044 Insert newline
5045 .
5046 .br
5047
5048 .
5049 .IP "\(bu" 4
5050 quote
5051 .
5052 .br
5053 Insert a control character
5054 .
5055 .br
5056
5057 .
5058 .IP "\(bu" 4
5059 quote8
5060 .
5061 .br
5062 Insert a meta character
5063 .
5064 .br
5065
5066 .
5067 .IP "\(bu" 4
5068 rtn
5069 .
5070 .br
5071 \fBReturn\fR / \fBEnter\fR key
5072 .
5073 .br
5074
5075 .
5076 .IP "\(bu" 4
5077 type
5078 .
5079 .br
5080 Insert typed character
5081 .
5082 .br
5083
5084 .
5085 .IP "\(bu" 4
5086 secure_type
5087 .
5088 .br
5089 Insert typed character, but only allowed in prompt windows (not allowed in shell windows)
5090 .
5091 .IP "" 0
5092 .
5093 .SS "Macros"
5094 .
5095 .IP "\(bu" 4
5096 macros
5097 .
5098 .br
5099 Insert keyboard macros into current file
5100 .
5101 .br
5102
5103 .
5104 .IP "\(bu" 4
5105 play
5106 .
5107 .br
5108 Execute a macro
5109 .
5110 .br
5111
5112 .
5113 .IP "\(bu" 4
5114 query
5115 .
5116 .br
5117 Suspend macro recording for user query
5118 .
5119 .br
5120
5121 .
5122 .IP "\(bu" 4
5123 record
5124 .
5125 .br
5126 Record a macro
5127 .
5128 .br
5129
5130 .
5131 .IP "\(bu" 4
5132 stop
5133 .
5134 .br
5135 Stop recording macro
5136 .
5137 .IP "" 0
5138 .
5139 .SS "Menu"
5140 .
5141 .IP "\(bu" 4
5142 backsmenu
5143 .
5144 .br
5145 Undo in file completion menu
5146 .
5147 .br
5148
5149 .
5150 .IP "\(bu" 4
5151 bofmenu
5152 .
5153 .br
5154 Move to beginning of menu
5155 .
5156 .br
5157
5158 .
5159 .IP "\(bu" 4
5160 bolmenu
5161 .
5162 .br
5163 Move to beginning of line in a menu
5164 .
5165 .br
5166
5167 .
5168 .IP "\(bu" 4
5169 dnarwmenu
5170 .
5171 .br
5172 Move down one line in a menu
5173 .
5174 .br
5175
5176 .
5177 .IP "\(bu" 4
5178 eolmenu
5179 .
5180 .br
5181 Move cursor to end of line in a menu
5182 .
5183 .br
5184
5185 .
5186 .IP "\(bu" 4
5187 eofmenu
5188 .
5189 .br
5190 Move cursor to end of menu
5191 .
5192 .br
5193
5194 .
5195 .IP "\(bu" 4
5196 ltarwmenu
5197 .
5198 .br
5199 Move cursor left in a menu
5200 .
5201 .br
5202
5203 .
5204 .IP "\(bu" 4
5205 rtarwmenu
5206 .
5207 .br
5208 Move cursor right in menu
5209 .
5210 .br
5211
5212 .
5213 .IP "\(bu" 4
5214 uparwmenu
5215 .
5216 .br
5217 Move cursor up in menu
5218 .
5219 .br
5220
5221 .
5222 .IP "\(bu" 4
5223 dnslidemenu
5224 .
5225 .br
5226 Scroll menu down one line
5227 .
5228 .br
5229
5230 .
5231 .IP "\(bu" 4
5232 upslidemenu
5233 .
5234 .br
5235 Scroll menu up one line
5236 .
5237 .br
5238
5239 .
5240 .IP "\(bu" 4
5241 pgupmenu
5242 .
5243 .br
5244 Scroll menu up
5245 .
5246 .br
5247
5248 .
5249 .IP "\(bu" 4
5250 pgdnmenu
5251 .
5252 .br
5253 Scroll menu down
5254 .
5255 .br
5256
5257 .
5258 .IP "\(bu" 4
5259 tabmenu
5260 .
5261 .br
5262 Tab through menu
5263 .
5264 .IP "" 0
5265 .
5266 .SS "Misc"
5267 .
5268 .IP "\(bu" 4
5269 beep
5270 .
5271 .br
5272 Beep
5273 .
5274 .br
5275
5276 .
5277 .IP "\(bu" 4
5278 execmd
5279 .
5280 .br
5281 Execute a JOE command
5282 .
5283 .br
5284
5285 .
5286 .IP "\(bu" 4
5287 debug_joe
5288 .
5289 .br
5290 Insert debug information into buffer
5291 .
5292 .br
5293
5294 .
5295 .IP "\(bu" 4
5296 math
5297 .
5298 .br
5299 Calculator
5300 .
5301 .br
5302
5303 .
5304 .IP "\(bu" 4
5305 maths
5306 .
5307 .br
5308 Secure Calculator (no way to run joe() macros)
5309 .
5310 .br
5311
5312 .
5313 .IP "\(bu" 4
5314 mode
5315 .
5316 .br
5317 Mode prompt
5318 .
5319 .br
5320
5321 .
5322 .IP "\(bu" 4
5323 menu
5324 .
5325 .br
5326 Menu prompt
5327 .
5328 .br
5329
5330 .
5331 .IP "\(bu" 4
5332 msg
5333 .
5334 .br
5335 Display a message
5336 .
5337 .br
5338
5339 .
5340 .IP "\(bu" 4
5341 notmod
5342 .
5343 .br
5344 Clear the modified flag
5345 .
5346 .br
5347
5348 .
5349 .IP "\(bu" 4
5350 retype
5351 .
5352 .br
5353 Refresh screen
5354 .
5355 .br
5356
5357 .
5358 .IP "\(bu" 4
5359 shell
5360 .
5361 .br
5362 Suspend process or execute a sub\-shell
5363 .
5364 .br
5365
5366 .
5367 .IP "\(bu" 4
5368 stat
5369 .
5370 .br
5371 Display cursor position
5372 .
5373 .br
5374
5375 .
5376 .IP "\(bu" 4
5377 tag
5378 .
5379 .br
5380 Tags file search
5381 .
5382 .br
5383
5384 .
5385 .IP "\(bu" 4
5386 tagjump
5387 .
5388 .br
5389 Jump to next tags file search match (only if notagsmenu is set)
5390 .
5391 .br
5392
5393 .
5394 .IP "\(bu" 4
5395 timer
5396 .
5397 .br
5398 Execute a macro periodically
5399 .
5400 .br
5401
5402 .
5403 .IP "\(bu" 4
5404 txt
5405 .
5406 .br
5407 Insert text\. If first character is `, then text is assumed to be a format string (that is, the string used to define the status line for the rmsg and lmsg options) and is formatted before the insertion\.
5408 .
5409 .br
5410
5411 .
5412 .IP "\(bu" 4
5413 name
5414 .
5415 .br
5416 Insert current file name
5417 .
5418 .br
5419
5420 .
5421 .IP "\(bu" 4
5422 language
5423 .
5424 .br
5425 Insert current language
5426 .
5427 .br
5428
5429 .
5430 .IP "\(bu" 4
5431 charset
5432 .
5433 .br
5434 Insert current character set
5435 .
5436 .br
5437
5438 .
5439 .IP "\(bu" 4
5440 keymap
5441 .
5442 .br
5443 Switch to another keymap
5444 .
5445 .IP "" 0
5446 .
5447 .SS "Prompts"
5448 .
5449 .IP "\(bu" 4
5450 complete
5451 .
5452 .br
5453 Complete a file\-name in a prompt
5454 .
5455 .br
5456
5457 .
5458 .IP "\(bu" 4
5459 if
5460 .
5461 .br
5462 Only run following cmds if expr is true (non\-zero)
5463 .
5464 .br
5465
5466 .
5467 .IP "\(bu" 4
5468 then
5469 .
5470 .br
5471 Same as rtn but only works in prompt windows
5472 .
5473 .br
5474
5475 .
5476 .IP "\(bu" 4
5477 elsif
5478 .
5479 .br
5480 Try a new condition
5481 .
5482 .br
5483
5484 .
5485 .IP "\(bu" 4
5486 else
5487 .
5488 .br
5489 Toggle truth flag
5490 .
5491 .br
5492
5493 .
5494 .IP "\(bu" 4
5495 endif
5496 .
5497 .br
5498 Start running cmds again
5499 .
5500 .br
5501
5502 .
5503 .IP "" 0
5504 .
5505 .P
5506 Here is an example \'if\' macro:
5507 .
5508 .P
5509 if,"char==65",then,"it\'s an A",else,"it\'s not an A",endif __^[ q__
5510 .
5511 .P
5512 When you hit __^[ q__, if the character under the cursor is an \'A\': "it\'s a A" is inserted into the buffer, otherwise "it\'s not an A" is inserted\.
5513 .
5514 .P
5515 "if" creates a math prompt (like __Esc M__)\. "then" is like "rtn"\- it hits the return key for this prompt\.
5516 .
5517 .P
5518 Within the math prompt, the following variables are available:
5519 .
5520 .IP "\(bu" 4
5521 char
5522 .
5523 .br
5524 ASCII value of character under cursor
5525 .
5526 .br
5527
5528 .
5529 .IP "\(bu" 4
5530 width
5531 .
5532 .br
5533 Width of screen
5534 .
5535 .br
5536
5537 .
5538 .IP "\(bu" 4
5539 height
5540 .
5541 .br
5542 Height of screen
5543 .
5544 .br
5545
5546 .
5547 .IP "\(bu" 4
5548 byte
5549 .
5550 .br
5551 byte number
5552 .
5553 .br
5554
5555 .
5556 .IP "\(bu" 4
5557 col
5558 .
5559 .br
5560 column number
5561 .
5562 .br
5563
5564 .
5565 .IP "\(bu" 4
5566 line
5567 .
5568 .br
5569 line number
5570 .
5571 .br
5572
5573 .
5574 .IP "\(bu" 4
5575 lines
5576 .
5577 .br
5578 no\. lines in file
5579 .
5580 .br
5581
5582 .
5583 .IP "\(bu" 4
5584 top
5585 .
5586 .br
5587 line number of top line of window
5588 .
5589 .IP "" 0
5590 .
5591 .SS "Repeat"
5592 .
5593 .IP "\(bu" 4
5594 arg
5595 .
5596 .br
5597 Prompt for repeat argument
5598 .
5599 .br
5600
5601 .
5602 .IP "\(bu" 4
5603 uarg
5604 .
5605 .br
5606 Universal argument
5607 .
5608 .IP "" 0
5609 .
5610 .SS "Scrolling"
5611 .
5612 .IP "\(bu" 4
5613 crawll
5614 .
5615 .br
5616 Pan screen left
5617 .
5618 .br
5619
5620 .
5621 .IP "\(bu" 4
5622 crawlr
5623 .
5624 .br
5625 Pan screen right
5626 .
5627 .br
5628
5629 .
5630 .IP "\(bu" 4
5631 dnslide
5632 .
5633 .br
5634 Scroll screen down 1 line
5635 .
5636 .br
5637
5638 .
5639 .IP "\(bu" 4
5640 pgdn
5641 .
5642 .br
5643 Scroll screen down
5644 .
5645 .br
5646
5647 .
5648 .IP "\(bu" 4
5649 pgup
5650 .
5651 .br
5652 Scroll screen up
5653 .
5654 .br
5655
5656 .
5657 .IP "\(bu" 4
5658 upslide
5659 .
5660 .br
5661 Scroll up one line
5662 .
5663 .IP "" 0
5664 .
5665 .SS "Search and replace"
5666 .
5667 .IP "\(bu" 4
5668 ffirst
5669 .
5670 .br
5671 Find text
5672 .
5673 .br
5674
5675 .
5676 .IP "\(bu" 4
5677 fnext
5678 .
5679 .br
5680 Repeat previous search
5681 .
5682 .br
5683
5684 .
5685 .IP "\(bu" 4
5686 isrch
5687 .
5688 .br
5689 Incremental search forward
5690 .
5691 .br
5692
5693 .
5694 .IP "\(bu" 4
5695 qrepl
5696 .
5697 .br
5698 Search and replace
5699 .
5700 .br
5701
5702 .
5703 .IP "\(bu" 4
5704 rfirst
5705 .
5706 .br
5707 Search backwards for text
5708 .
5709 .br
5710
5711 .
5712 .IP "\(bu" 4
5713 rsrch
5714 .
5715 .br
5716 Reverse incremental search
5717 .
5718 .IP "" 0
5719 .
5720 .SS "Windows"
5721 .
5722 .IP "\(bu" 4
5723 explode
5724 .
5725 .br
5726 Display one window or display all windows
5727 .
5728 .br
5729
5730 .
5731 .IP "\(bu" 4
5732 dupw
5733 .
5734 .br
5735 Duplicate current window
5736 .
5737 .br
5738
5739 .
5740 .IP "\(bu" 4
5741 groww
5742 .
5743 .br
5744 Increase size of window
5745 .
5746 .br
5747
5748 .
5749 .IP "\(bu" 4
5750 nextw
5751 .
5752 .br
5753 Move cursor to next window
5754 .
5755 .br
5756
5757 .
5758 .IP "\(bu" 4
5759 prevw
5760 .
5761 .br
5762 Go to previous window
5763 .
5764 .br
5765
5766 .
5767 .IP "\(bu" 4
5768 shrinkw
5769 .
5770 .br
5771 Shrink window
5772 .
5773 .br
5774
5775 .
5776 .IP "\(bu" 4
5777 splitw
5778 .
5779 .br
5780 Split window into two
5781 .
5782 .br
5783
5784 .
5785 .IP "\(bu" 4
5786 tw0
5787 .
5788 .br
5789 Eliminate this window
5790 .
5791 .br
5792
5793 .
5794 .IP "\(bu" 4
5795 tw1
5796 .
5797 .br
5798 Show only one window
5799 .
5800 .br
5801
5802 .
5803 .IP "\(bu" 4
5804 mwind
5805 .
5806 .br
5807 Get error messages window on the screen and put cursor in it\.
5808 .
5809 .br
5810
5811 .
5812 .IP "\(bu" 4
5813 showlog
5814 .
5815 .br
5816 Get startup log scratch buffer into window\.
5817 .
5818 .br
5819
5820 .
5821 .IP "\(bu" 4
5822 mfit
5823 .
5824 .br
5825 Fit two windows on the screen: make current window 6 lines, and give rest of space to window above\. The window above is either the existing previous window, a newly created one if there wasn\'t one\.
5826 .
5827 .IP "" 0
5828 .
5829 .SS "Undo"
5830 .
5831 .IP "\(bu" 4
5832 redo
5833 .
5834 .br
5835 Re\-execute the latest undone change
5836 .
5837 .br
5838
5839 .
5840 .IP "\(bu" 4
5841 undo
5842 .
5843 .br
5844 Undo last change
5845 .
5846 .IP "" 0
5847 .
5848 .SS "Mouse"
5849 .
5850 .IP "\(bu" 4
5851 tomouse
5852 .
5853 .br
5854 Move the cursor to where the mouse was clicked/dragged
5855 .
5856 .br
5857
5858 .
5859 .IP "\(bu" 4
5860 defmdown
5861 .
5862 .br
5863 Default single\-click handler, usually bound to MDOWN\. Positions cursor to mouse and begins a region\.
5864 .
5865 .br
5866
5867 .
5868 .IP "\(bu" 4
5869 defmup
5870 .
5871 .br
5872 Default single\-click release handler, usually bound to MUP\. Completes selection of a region\.
5873 .
5874 .br
5875
5876 .
5877 .IP "\(bu" 4
5878 defmdrag
5879 .
5880 .br
5881 Default single\-click drag handler, usually bound to MDRAG\. Selects a region of text a character at a time\.
5882 .
5883 .br
5884
5885 .
5886 .IP "\(bu" 4
5887 defm2down
5888 .
5889 .br
5890 Default double\-click handler, usually bound to M2DOWN\.
5891 .
5892 .br
5893
5894 .
5895 .IP "\(bu" 4
5896 defm2up
5897 .
5898 .br
5899 Default double\-click release handler, usually bound to M2UP\.
5900 .
5901 .br
5902
5903 .
5904 .IP "\(bu" 4
5905 defm2drag
5906 .
5907 .br
5908 Default double\-click drag handler, usually bound to M2DRAG\. Selects a region of text a word at a time\.
5909 .
5910 .br
5911
5912 .
5913 .IP "\(bu" 4
5914 defm3down
5915 .
5916 .br
5917 Default triple\-click handler, usually bound to M3DOWN\.
5918 .
5919 .br
5920
5921 .
5922 .IP "\(bu" 4
5923 defm3up
5924 .
5925 .br
5926 Default triple\-click release handler, usually bound to M3UP\.
5927 .
5928 .br
5929
5930 .
5931 .IP "\(bu" 4
5932 defm3drag
5933 .
5934 .br
5935 Default triple\-click drag handler, usually bound to M3DRAG\. Selects a region of text a line at a time\.
5936 .
5937 .br
5938
5939 .IP "\(bu" 4
5940 defmiddledown
5941 .
5942 .br
5943 Default middle click handler, usually bound to MIDDLEDOWN. This inserts text\.
5944 .
5945 .br
5946
5947 .IP "\(bu" 4
5948 defmiddleup
5949 .
5950 .br
5951 Default middle click release handler, usually bound to MIDDLEUP\.
5952 .
5953 .br
5954
5955 .
5956 .IP "\(bu" 4
5957 xtmouse
5958 .
5959 .br
5960 Handle xterm mouse events, usually bound to Esc [ M\. It parses the rest of the sequence and generates fake "keys" that can be bound to macros in the joerc file\. It uses a timer to detect double-click and triple-click\. The keys are: MUP, MDOWN, MDRAG, M2UP, M2DOWN, M2DRAG, M3UP, M3DOWN, M3DRAG, MWUP and MWDOWN\.
5961 .
5962 .br
5963
5964 .
5965 .IP "\(bu" 4
5966 extmouse
5967 .
5968 .br
5969 Handle extended xterm mouse events, usually bound to Esc [ <.
5970 .
5971 .br
5972
5973 .
5974 .IP "\(bu" 4
5975 paste
5976 .
5977 .br
5978 Insert base64 encoded text (for XTerm \-\-enable\-base64 option)\.
5979 .
5980 .br
5981
5982 .
5983 .IP "\(bu" 4
5984 brpaste
5985 .
5986 .br
5987 Disable autoindent, wordwrap and spaces\. The idea is to bind this to \fBEsc [ 2 0 0 ~\fR so that when the terminal emulator sends a mouse paste, the text is inserted as\-is\.
5988 .
5989 .br
5990
5991 .
5992 .IP "\(bu" 4
5993 brpaste_done
5994 .
5995 .br
5996 Restore autoindent, wordwrap and spaces modes to their original values before brpaste\. The idea is to bind this to \fBEsc [ 2 0 1 ~\fR so that these modes are restored after a mouse paste\.
5997 .
5998 .br
5999
6000 .
6001 .IP "" 0
6002