JOE - Joe's Own Editor
| Use Case | Command | Description |
|---|---|---|
| Start editor | joe filename | Edit a file |
| Save and exit | ^K X | Save file and exit editor |
| Exit without saving | ^C | Abort editing (no save) |
| Save file | ^K D | Save current file (may rename) |
| Search text | ^K F | Find text forward/backward |
| Replace text | ^K F r | Search and replace |
| Undo | ^_ (Ctrl+Shift+-) | Undo last change |
| Redo | ^^ (Ctrl+6) | Redo undone change |
| Help | ^K H | Toggle help window |
| Command prompt | Esc X | Execute any JOE command by name |
| Shell window | ^K ` | Open a shell in a window |
| Spell check | Esc N (word) / Esc L (block/file) | Check spelling with aspell |
joe [global-options] [ [local-options] filename ]...
jstar [global-options] [ [local-options] filename ]...
jmacs [global-options] [ [local-options] filename ]...
rjoe [global-options] [ [local-options] filename ]...
jpico [global-options] [ [local-options] filename ]...
JOE is a powerful console screen editor. It has a "mode-less" user interface 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 with many features for editing programs and text.
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.
Although JOE is actually five different editors, it requires only one executable, but 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.
JOE is free software; you can distribute it and/or modify it under the terms of the GNU General Public License. JOE is available over the Internet from http://www.sourceforge.net/projects/joe-editor.
To start the editor, type joe followed by zero or more names of files you want to edit. Each file name may be preceded by a local option setting. Other global options, which apply to the editor as a whole, may also be placed on the command line. 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 Filenames below for details.
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 ^K H for help in the editor.
The ^ means that you hold down the Control key while pressing the following key. A number of control-key sequences are duplicated on other keys: Esc works in place of ^[, Del in place of ^?, Backspace in place of ^H, Tab in place of ^I, Return or Enter in place of ^M and Linefeed in place of ^J. Some keyboards may give trouble with some control keys. ^_, ^^ and ^@ can usually be entered without pressing shift (i.e., try ^-, ^6 and ^2). Other keyboards may reassign these to other keys. ^Space can usually be used in place of ^@.
On some keyboards, holding the Alt key down while pressing another key is the same as typing Esc before typing the other key.
Once you have typed ^K H, 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 Esc , and Esc . (that is, Esc , and Esc .). Use ^K H to dismiss the help window.
You can customize the keyboard layout, the help screens and a number of behavior defaults by copying JOE's initialization file (usually /etc/joe/joerc) to .joerc in your home directory and then by modifying it. See the section joerc below.
To have JOE used as your default editor for e-mail and News, set the EDITOR and VISUAL environment variables in your shell initialization file (.cshrc or .profile) to refer to JOE (JOE usually resides as /usr/bin/joe).
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 Environment variables below.
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.
An option is enabled when it's given like this: -wordwrap. An option is disabled when it's given like this: --wordwrap. Some options take arguments: -lmargin 5.
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
With a 16-color or 256-color terminal emulator, these brighter than normal colors become available:
With a 256-color terminal emulator, these become available:
-lmsg defines the left-justified string and -rmsg defines the right-justified string. The first character of -rmsg is the background fill character. -smsg defines the status command (^K Space). -zmsg defines it when the cursor is at the end of the file. The last character of smsg or zmsg is the fill character.
Escape sequences:
%t â 12 hour time%u â 24 hour time%T â O for overtype mode, I for insert mode%W â W if wordwrap is enabled%I â A if autoindent is enabled%X â Rectangle mode indicator%n â File name%m â '(Modified)' if file has been changed%* â '*' if file has been changed%R â Read-only indicator%r â Row (line) number%c â Column number%o â Byte offset into file%O â Byte offset into file in hex%a â Ascii value of character under cursor%A â Ascii value of character under cursor in hex%w â Width of character under cursor%p â Percent of file cursor is at%l â No. lines in file%k â Entered prefix keys%S â '*SHELL*' if there is a shell running in window%M â Macro recording message%y â Syntax%e â Encoding%x â Context (first non-indented line going backwards)%dd â day%dm â month%dY â year%Ename% â value of environment variable%Tname% â value of option (ON or OFF for Boolean options)Formatting escape sequences: \i (inverse), \u (underline), \b (bold), \d (dim), \f (blink), \l (italic).
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). To replace text, delete the old text before or after typing the replacement. The Backspace key deletes backwards. Hit Enter to insert a line-break. Use arrow keys to move around; if arrow keys don't work, use ^F (forward), ^B (backward), ^P (up), ^N (down). The Tab key inserts a tab character. If the screen gets messed up, hit ^R to refresh. Other deletion keys: ^D deletes character under cursor, ^Y deletes entire line, ^J deletes to end of line. Movement keys: ^A to beginning of line, ^E to end, ^U/^V scroll up/down half screen, ^K U/^K V to beginning/end of file. Undo with ^_ (Ctrl+Shift+-), redo with ^^ (Ctrl+6).
Hit ^K - to return to the last place you made a change. Step through history with ^K - and ^K =.
Hit ^K X to exit the editor. You will be prompted for a file name if not already named. To exit without saving changes, hit ^C. A backup copy (with ~ appended) is saved when changes are saved.
^K D saves the current file (possibly under a different name). ^K E edits a different file. ^K R inserts a file into the current buffer.
Wherever JOE expects a file name, you may also type:
joe '!ls' to edit directory listing.quota -v | joe | mail root.If you need to pipe a file into JOE, use: echo "hi" | joe. For shell scripts with redirected stdin/stdout, use: joe filename </dev/tty >/dev/tty.
If you type past the right edge in a normal file, JOE automatically wraps the last word onto the next line (word-wrap mode). Toggle with ^T W. To reformat a paragraph, hit ^K J. Set margins with ^T L and ^T R. Options: cpara (indent characters), cnotpara (non-paragraph characters), french (spaces after periods), flowed (extra space after lines), overtype (disable word wrap).
Use ^K A to center a line within the margins.
Hit Esc N to check spelling of word under cursor, Esc L to check highlighted block or entire file. Language can be changed with ^T V.
Toggle with ^T T. In overtype mode, typing replaces existing characters. To insert while in overtype mode, hit ^@ (inserts a space).
Enter control characters (0-31) by hitting ^Q followed by a character in the range @, A-Z, [, \, ], ^, _, ?. Enter meta characters (above 127) by hitting ^\ followed by the character. asis mode passes meta characters untranslated to the terminal.
JOE natively handles UTF-8 and byte-coded character sets (like ISO-8859-1). UTF-16 is supported via conversion to UTF-8 during load and back to UTF-16 during save. The terminal and file can have different encodings. Character set is determined by LC_ALL, LC_CTYPE, or LANG. Use ^T E to change file coding. Hit Tab Tab for a list of available codings. Use ^K Space to see current character set. To enter a Unicode character, use ^Q x if file coding is UTF-8.
Most prompts record a history of responses. Use up/down arrow to step through. Prompts are single-line windows with no status line, so you can use editing commands. You can also switch out of prompts with ^K P and ^K N.
Hit Tab in any prompt to request completion. Hit Tab twice to bring up a list of possibilities. You can jump into the menu window with ^K P and use arrow keys and Enter to make a selection. In a menu, hit the first letter of an item to jump to it. Tab completion works in search and replace prompts based on buffer contents. Hit Esc Enter in a text window to complete a word based on buffer contents.
Hit ^K Space to report line number, column number, byte number, and ASCII code of character under cursor. You can have line/column always displayed on the status line by editing the joerc file.
Hit the space bar â it runs an innocuous command (shows line number).
Hit ^K Z to suspend the editor and go back to the shell. Type fg or exit to return.
Hit ^K F to search forwards or backwards. You are prompted for text and then options. Options include: b (backwards), i (case insensitive), nnn (Nth occurrence), r (replace), a (search all loaded buffers), e (search error list), x (standard regex syntax), y (JOE syntax), v (debug info). Hit ^L to repeat previous search. In replace mode, hit y (replace), n (skip), r (replace all), ^C (stop), B or Backspace (back up).
Special sequences: \* (zero or more), \+ (one or more), \? (optional), \{min,max} (specific count), \. (any character), \! (balanced C expression), \| (alternation), \( \) (grouping), ^ \$ (line begin/end), \ (word boundaries), \[...] (character class), \\ (backslash), \n (newline).
Replacement sequences: \& (matched text), \1-\9 (group match), \l/\u (next character case), \L/\U (all following case), \\ (backslash), \n (newline).
Escape sequences: \x{10ffff} (Unicode code point), \xFF (hex byte), \377 (octal byte), \p{Ll} (Unicode category/block). Also: \d (digit), \D, \w (word character), \W, \s (space), \S, \i (identifier start), \I, \c (identifier continuation), \C. Common escapes: \t (tab), \n (newline), \r (carriage return), \b (backspace), \a (alert), \f (formfeed), \e (escape), \\ (backslash).
Use Esc S (forward) or Esc R (backward). As you type, cursor jumps to first match. Esc S/Esc R again to find next or switch direction. ^S, ^\, ^L work like Esc S; ^R like Esc R. Backspace undoes last action. ^Q inserts control characters. Any other key exits incremental search.
Hit ^G to jump between matching delimiters (character or word). Works for parentheses, begin/end, XML tags, #if/#else/#endif. Skips delimiters in comments/strings if configured. Options: c_comment, cpp_comment, pound_comment, semi_comment, vhdl_comment, single_quoted, double_quoted, highlighter_context, text_delimiters.
To work with a block of text: move cursor to start, press ^K B; move to end, press ^K K. Then use ^K M (move), ^K C (copy), ^K Y (delete), ^K W (write to file), ^K / (filter through UNIX command, e.g., sort). To deselect, hit ^K B ^K K or ^C (JOE 4.2+). New ways: Ctrl+Right Arrow to start selecting, Ctrl+Delete to cut, Ctrl+Insert to paste. Mouse selection also works if enabled.
Toggle auto-indent with ^T I. Use ^K , and ^K . to shift block left/right. Options: smartbacks, smarthome, indentfirst, purify, guess_indent. ^T = quickly selects common indentation values.
Toggle with ^T X. Allows block operations on columns. Useful for moving, copying, deleting, or saving columns of text. Overtype mode (^T T) replaces existing text instead of inserting.
Toggle with ^T P. Helps with ASCII drawings. When cursor is past end of line, picture mode fills with spaces so characters can be inserted at cursor position.
Edit multiple files or places: ^K O splits the screen. ^K P / ^K N move to previous/next window. ^K E edits a new file in a window. ^K X or ^C closes a window. ^K I shows only the current window or all windows. ^K G / ^K T change window height. Windows are in a ring; only a section may fit on screen. orphan option controls whether extra files are loaded as orphans. bufed command shows all buffers. Esc V / Esc U cycle through buffers in a window. Windows maintain a stack of occupants for pop-up shell windows.
Scratch buffers are not saved. Examples: pop-up shell windows, startup log, compile/grep message windows. Create with scratch command. Commands: showlog (startup log), mwind (message window).
Record a macro: ^K [ followed by a number 0-9, then keystrokes, then ^K ]. Play with ^K followed by the number. Macros can include prompts and subroutines. Use ^K ? to suspend recording for user input. Repeat command: ^K \ followed by a number, then the command. Macros can be defined in joerc file with :def. The Esc X command prompt allows executing any macro. Commands can be combined with ! (allow failure), # (repeat individual command), ~ (suppress macro repeat), - (opposite for negative argument). Also psh/pop for saving/restoring block positions, query for dialog suspension.
Use ctags to generate a tags file. JOE looks for "tags" in current directory or TAGS environment variable. Type ^K ; to search for an identifier. Tab completion works. If multiple matches, behavior depends on notagsmenu option. ^K - returns to original location. ^K O to split window first.
Invoke with Esc M. Math functions: 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. Variables: e, pi, top, lines, line, col, byte, size, height, width, char, markv, rdonly, arg, argset, is_shell, no_windows, ans. Commands: hex, dec, ins, sum, cnt, avg, dev, eval, joe(...). Operators: !, ^, *, /, %, +, -, <, <=, >, >=, ==, !=, &&, ||, ?:, =, :.
Hit ^K ` to run a command shell in a window. Type at the end of the shell window to pass input to the shell. Output is appended. Keys passed: ^C, Backspace, Del, Return, ^D. Type exit to stop. ^C when cursor not at end kills the shell. Pop-up shell windows (F1-F4) use full terminal emulation. More keys are passed (arrow keys, Ctrl-C). Close with ^K Q or 'pop' command. Shell startup script /etc/joe/shell.sh provides aliases like clear, joe, math, cd, markb, markk, parse, parserr, release, pop.
parse grep -n FIXME *.cparserr makeparserr parses buffer for compiler errors (format: file.name junk line-number : junk). gparse parses output of grep/find (filename, filename:line-number). Use Esc - and Esc = to visit locations. Use 'e' search option to replace across all files. release clears the list. Esc Space (jump command) parses current line and jumps.
Hit Esc G, enter command like grep -n fred *.c. Then use Esc Space, Esc =, Esc - to navigate.
Hit Esc C to save all files and run compile command (e.g., "make -w"). Results are parsed. Use Esc Space, Esc =, Esc - to navigate errors.
Enable with ^T H. Select syntax with ^T Y (Tab Tab for completion). JOE determines syntax from file name/contents. Syntax files are in /usr/share/joe/syntax/. The syntax definition uses a deterministic state machine. Each state has a name, color, and context (comment/string). Transitions define jumps to other states based on character lists. Options: noeat, recolor, mark, markend, recolormark, buffer, save_c, save_s, strings, istrings, hold, call, return.
Copy /etc/joe/joerc to $HOME/.joerc to customize. Includes ftyperc for file type table. Loading sequence: user's .joerc, system /etc/joe/joerc, built-in. Sections: global options, file name dependent options, ^T menu system, help screens, key bindings (main, prompt, query, querya, querysr, shell, vtshell). Key binding tables can inherit from others.
Use Esc X mode to toggle options. Tab Tab for completion list.
Use Esc X menu to bring up named menus defined in joerc. ^T is bound to menu,"root",rtn.
Enable with -mouse option. Left-click to set cursor, select text, middle-click to copy. Shift+click for normal X cut/paste. -joexterm enhances with proper X integration. Hold shift to use standard X selection. Scroll wheel scrolls cursor window. Bracketed paste mode disables autoindent/wordwrap during paste.
Set TERM to xterm, xterm-color, xterm-16color, xterm-88color, or xterm-256color. Use -assume_256color if termcap missing. Example: joe -assume_256color -text_color bg_222.
Enable with -hex or via ^T menu. Buffer displayed as hex dump. Overtype mode recommended. To enter hex byte: ^Q x F 8. Use ^K C to copy block. Esc X byte to jump to byte offset. Search and replace work normally.
These commands can be entered at the Esc X prompt.
bknd â Run a shell in a windowvtbknd â Run a shell in a terminal emulator windowkillproc â Kill program in current windowrun â Run a UNIX command in a windowsys â Run a UNIX command and return to editor when doneblkcpy â Copy marked block to cursorblkdel â Delete marked blockblkmove â Move marked block to cursorblksave â Save marked block into a filecopy â Copy block to kill-ringdrop â Set markb; if already set, eliminate itdropon â Set markb; if already set, eliminate it; turn on marking modetoggle_marking â Toggle between clearing and setting block marksbegin_marking â Set markb to other edge and turn on markingselect â Set markb if not already setfilt â Filter block or file through a UNIX commandmarkb â Set beginning of block markmarkk â Set end of block markmarkl â Mark current linenmark â Eliminate markb and markkpicokill â Delete line or blockpop â Restore markb and markk from stackpsh â Push markb and markk onto stackswap â Switch cursor with markbtomarkb â Move cursor to markbtomarkbk â Move cursor to markb or markktomarkk â Move cursor to markkyank â Insert top of kill ringyankpop â Scroll through kill ringyapp â Append next kill to top of kill ringupper â Convert block to uppercaselower â Convert block to lowercasebufed â Buffer menuedit â Load file into window; asks to reload if buffer existsswitch â Load file into window; always uses buffer if existsscratch â Push a scratch buffer into current windowpopabort â Abort and pop window from stacknbuf â Load next buffer into current windowpbuf â Load previous buffer into current windowreload â Re-read file into buffer (revert)reloadall â Re-read all unmodified buffersbof â Beginning of filebol â Beginning of line (always)bop â Beginning of paragraphbos â Beginning of screenbkwdc â Search backwards for a characterbyte â Move cursor to specific byte offsetcol â Move cursor to specific column numberdnarw â Move cursor down one lineeof â End of fileeol â End of lineeop â End of paragraphfwrdc â Search forward for matching charactergomark â Move cursor to a bookmarkhome â Move cursor to beginning of lineline â Move cursor to specified lineltarw â Move cursor leftnedge â Move cursor to next edgenextpos â Move cursor to next position in cursor position historynextword â Move cursor to end of next wordpedge â Move cursor to previous edgeprevpos â Move cursor to previous position in cursor position historyprevword â Move cursor to beginning of previous wordrtarw â Move cursor rightsetmark â Set a bookmarktomatch â Move cursor to matching delimitertos â Move cursor to top of screenuparw â Move cursor upbacks â Backspacebackw â Backspace a worddelbol â Delete to beginning of linedelch â Delete character under cursordeleol â Delete to end of linedellin â Delete entire linedelw â Delete word to rightnxterr â Goto next parsed errorparserr â Parse errors in current filegparse â Parse grep list in current filejump â Parse current line and jump to itprverr â Go to previous parsed errorshowerr â Show current messagegrep â Execute grep command, parse when donebuild â Execute build command, parse when donerelease â Release error/grep recordscancel â Like abort, but doesn't return failureabort â Abort current buffer/window; prompt if changedabortbuf â Like abort but fails if last window on modified bufferask â Prompt to save current fileexsave â Save file and exitlose â EMACS kill buffer (delete buffer, replace with scratch)querysave â Prompt to save each modified bufferkilljoe â Exit JOE immediately without checkingcd â Set directory prefixsave â Save filesavenow â Save immediately, unless file name is unknowninsf â Insert a filecenter â Center linefmtblk â Format all paragraphs in a blockformat â Format current paragraphlindent â Indent to the leftrindent â Indent to the righthelp â Turn help on or offhnext â Switch to next help screenhprev â Switch to previous help screenctrl â Type next keyfinish â Complete word in text windowinsc â Insert a spaceopen â Insert newlinequote â Insert a control characterquote8 â Insert a meta characterrtn â Return/Enter keytype â Insert typed charactersecure_type â Insert typed character, only in prompt windowsmacros â Insert keyboard macros into current fileplay â Execute a macroquery â Suspend macro recording for user queryrecord â Record a macrostop â Stop recording macrobacksmenu â Undo in file completion menubofmenu â Move to beginning of menubolmenu â Move to beginning of line in a menudnarwmenu â Move down one line in a menueolmenu â Move cursor to end of line in a menueofmenu â Move cursor to end of menultarwmenu â Move cursor left in a menurtarwmenu â Move cursor right in menuuparwmenu â Move cursor up in menudnslidemenu â Scroll menu down one lineupslidemenu â Scroll menu up one linepgupmenu â Scroll menu uppgdnmenu â Scroll menu downtabmenu â Tab through menubeep â Beepexecmd â Execute a JOE commanddebug_joe â Insert debug information into buffermath â Calculatormaths â Secure Calculator (no joe() macros)mode â Mode promptmenu â Menu promptmsg â Display a messagenotmod â Clear the modified flagretype â Refresh screenshell â Suspend process or execute a sub-shellstat â Display cursor positiontag â Tags file searchtagjump â Jump to next tags file search matchtimer â Execute a macro periodicallytxt â Insert text (format string if first char is `)name â Insert current file namelanguage â Insert current languagecharset â Insert current character setkeymap â Switch to another keymapcomplete â Complete a file-name in a promptif â Only run following cmds if expr is truethen â Same as rtn but only in prompt windowselsif â Try a new conditionelse â Toggle truth flagendif â Start running cmds againExample if macro: if,"char==65",then,"it's an A",else,"it's not an A",endif. Variables available in math prompt: char, width, height, byte, col, line, lines, top.
arg â Prompt for repeat argumentuarg â Universal argumentcrawll â Pan screen leftcrawlr â Pan screen rightdnslide â Scroll screen down 1 linepgdn â Scroll screen downpgup â Scroll screen upupslide â Scroll up one lineffirst â Find textfnext â Repeat previous searchisrch â Incremental search forwardqrepl â Search and replacerfirst â Search backwards for textrsrch â Reverse incremental searchexplode â Display one window or all windowsdupw â Duplicate current windowgroww â Increase size of windownextw â Move cursor to next windowprevw â Go to previous windowshrinkw â Shrink windowsplitw â Split window into twotw0 â Eliminate this windowtw1 â Show only one windowmwind â Get error messages window on screenshowlog â Get startup log scratch buffer into windowmfit â Fit two windows on screenredo â Re-execute the latest undone changeundo â Undo last changetomouse â Move cursor to where mouse was clicked/draggeddefmdown â Default single-click handlerdefmup â Default single-click release handlerdefmdrag â Default single-click drag handlerdefm2down â Default double-click handlerdefm2up â Default double-click release handlerdefm2drag â Default double-click drag handlerdefm3down â Default triple-click handlerdefm3up â Default triple-click release handlerdefm3drag â Default triple-click drag handlerdefmiddledown â Default middle click handlerdefmiddleup â Default middle click release handlerxtmouse â Handle xterm mouse eventsextmouse â Handle extended xterm mouse eventspaste â Insert base64 encoded textbrpaste â Enable bracketed paste modebrpaste_done â Restore modes after bracketed pasteGenerated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-18 17:37 @2600:1f28:365:80b0:f8a4:e764:d6bb:8e66
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format