man > jstar(1)

📘 JOE()

📋 NAME

JOE - Joe's Own Editor

🚀 Quick Reference

Use CaseCommandDescription
Start editorjoe filenameEdit a file
Save and exit^K XSave file and exit editor
Exit without saving^CAbort editing (no save)
Save file^K DSave current file (may rename)
Search text^K FFind text forward/backward
Replace text^K F rSearch and replace
Undo^_ (Ctrl+Shift+-)Undo last change
Redo^^ (Ctrl+6)Redo undone change
Help^K HToggle help window
Command promptEsc XExecute any JOE command by name
Shell window^K `Open a shell in a window
Spell checkEsc N (word) / Esc L (block/file)Check spelling with aspell

đŸ”ĸ Syntax

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 ]...

📄 Description

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.

🔧 Usage

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.

âš™ī¸ Command Line Options

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.

📌 Global Options

📌 Local Options

🎨 Colors and Attributes

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:

📊 Status Line Definition Strings

-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:

Formatting escape sequences: \i (inverse), \u (underline), \b (bold), \d (dim), \f (blink), \l (italic).

📝 Basic Editing

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).

📍 Cursor Position History

Hit ^K - to return to the last place you made a change. Step through history with ^K - and ^K =.

💾 Save and Exit

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.

📁 File Operations

^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.

📄 Filenames

Wherever JOE expects a file name, you may also type:

đŸ–Ĩī¸ Using JOE in a Shell Script

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.

📐 Word Wrap and Formatting

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).

📐 Centering

Use ^K A to center a line within the margins.

🔤 Spell Checker

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.

🔄 Overtype Mode

Toggle with ^T T. In overtype mode, typing replaces existing characters. To insert while in overtype mode, hit ^@ (inserts a space).

đŸ”Ŗ Control and Meta Characters

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.

🌐 Character Sets and UTF-8

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.

đŸ’Ŧ Prompts

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.

🔍 Completion and Selection Menus

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.

❓ Where am I?

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.

❓ What if I hit ^K by accident?

Hit the space bar — it runs an innocuous command (shows line number).

â¸ī¸ Temporarily Suspending the Editor

Hit ^K Z to suspend the editor and go back to the shell. Type fg or exit to return.

🔍 Searching for Text

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).

đŸ”Ŗ Regular Expressions

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).

🔍 Incremental Search

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.

🔗 Goto Matching Delimiter

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.

đŸ“Ļ Regions

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.

📐 Indenting Program Blocks

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.

📐 Rectangle Mode

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.

📐 Picture Mode

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.

đŸĒŸ Windows

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

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).

âŒ¨ī¸ Keyboard Macros

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.

đŸˇī¸ Tags Search

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.

🧮 Calculator

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: !, ^, *, /, %, +, -, <, <=, >, >=, ==, !=, &&, ||, ?:, =, :.

đŸ–Ĩī¸ Shell Windows

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.

📋 Use Cases

🔧 Compiler and Grep/Find Parsers

parserr 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.

🔍 Grep-find

Hit Esc G, enter command like grep -n fred *.c. Then use Esc Space, Esc =, Esc - to navigate.

đŸ› ī¸ Compile

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.

🎨 Syntax Highlighting

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.

📄 The joerc File

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.

âš™ī¸ Mode Command

Use Esc X mode to toggle options. Tab Tab for completion list.

📋 Menu Command

Use Esc X menu to bring up named menus defined in joerc. ^T is bound to menu,"root",rtn.

đŸ–ąī¸ Xterm Mouse Support

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.

🎨 Color Xterm Support

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.

đŸ”ĸ Hex Edit Mode

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.

🌍 Environment Variables

📋 JOE Commands Grouped by Function

These commands can be entered at the Esc X prompt.

🔄 Background Programs

đŸ“Ļ Blocks

📂 Buffers

đŸ–ąī¸ Cursor Motion

❌ Deletion

🔧 Error Parsing

đŸšĒ Exit

📁 Files

📐 Formatting

❓ Help

âœī¸ Inserting

âŒ¨ī¸ Macros

📋 Menu

🔧 Misc

đŸ’Ŧ Prompts

Example 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.

🔁 Repeat

📜 Scrolling

🔍 Search and Replace

đŸĒŸ Windows

â†Šī¸ Undo

đŸ–ąī¸ Mouse

jstar(1)
📘 JOE() 📋 NAME 🚀 Quick Reference đŸ”ĸ Syntax 📄 Description 🔧 Usage âš™ī¸ Command Line Options
📌 Global Options 📌 Local Options 🎨 Colors and Attributes 📊 Status Line Definition Strings
📝 Basic Editing
📍 Cursor Position History 💾 Save and Exit 📁 File Operations 📄 Filenames đŸ–Ĩī¸ Using JOE in a Shell Script 📐 Word Wrap and Formatting 📐 Centering 🔤 Spell Checker 🔄 Overtype Mode đŸ”Ŗ Control and Meta Characters
🌐 Character Sets and UTF-8 đŸ’Ŧ Prompts
🔍 Completion and Selection Menus
❓ Where am I? ❓ What if I hit ^K by accident? â¸ī¸ Temporarily Suspending the Editor 🔍 Searching for Text
đŸ”Ŗ Regular Expressions 🔍 Incremental Search 🔗 Goto Matching Delimiter
đŸ“Ļ Regions
📐 Indenting Program Blocks 📐 Rectangle Mode 📐 Picture Mode
đŸĒŸ Windows 📝 Scratch Buffers âŒ¨ī¸ Keyboard Macros đŸˇī¸ Tags Search 🧮 Calculator đŸ–Ĩī¸ Shell Windows
📋 Use Cases
🔧 Compiler and Grep/Find Parsers
🔍 Grep-find đŸ› ī¸ Compile
🎨 Syntax Highlighting 📄 The joerc File
âš™ī¸ Mode Command 📋 Menu Command
đŸ–ąī¸ Xterm Mouse Support 🎨 Color Xterm Support đŸ”ĸ Hex Edit Mode 🌍 Environment Variables 📋 JOE Commands Grouped by Function
🔄 Background Programs đŸ“Ļ Blocks 📂 Buffers đŸ–ąī¸ Cursor Motion ❌ Deletion 🔧 Error Parsing đŸšĒ Exit 📁 Files 📐 Formatting ❓ Help âœī¸ Inserting âŒ¨ī¸ Macros 📋 Menu 🔧 Misc đŸ’Ŧ Prompts 🔁 Repeat 📜 Scrolling 🔍 Search and Replace đŸĒŸ Windows â†Šī¸ Undo đŸ–ąī¸ Mouse

Generated 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/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^