Debian Codegraph @

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