The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,482 other followers

User Manual – Joe’s Own Editor: Word wrap and formatting

Posted by jpluimers on 2021/09/17

[WayBack] User Manual – Joe’s Own Editor: 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:


An option is disabled when it’s given like this:


[WayBack] User Manual – Joe’s Own Editor: Word wrap and formatting

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 Enter. This is called word-wrap mode. Word-wrap can be turned on or off with the ^T W 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 joerc file to change this and other defaults.

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

The margins which JOE uses for paragraph formatting and word-wrap can be set with the ^T L and ^T R 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.

There are a number of options which control the paragraph reformatter and word wrapper:

  • The cpara option provides a list of characters which can indent a paragraph. For example, in e-mail quoted matter is indicated by > at the beginnings of line, so this character should be in the cpara list.
  • The cnotpara 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.
  • 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.
  • french determines how many spaces are inserted after periods.
  • When flowed 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.
  • When overtype is enabled, the word wrapper will not insert lines.

Joe configuration file

Pre-configuring needs modifying the configuration file:

[WayBack] User Manual – Joe’s Own Editor: Command Line Options

^T 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 /etc/joe/joerc) to $HOME/.joerc, 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.

The joerc file has a directive to include another file (:include). This facility is used to include a file called ftyperc (usually located in /etc/joe/ftyperc). ftyperc has the file type table which determines which local options (including syntax for the highlighter) are applied to each file type.

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:

  • “$HOME/.joerc” – The user’s personalized joerc file.
  • “/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.
  • “*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.

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.

The joerc file is broken up into a number of sections:

  • Global options Options which are not file specific, like noxon.
  • File name and content dependent options Options which depend on the file type, such as autoindent. The ftyperc file is included in this section.
  • ^T menu system definition Use :defmenu to define a named menu of macros. The menu command brings up a specific named menu. ^T is a macro which brings up the root menu: menu,”root”,rtn.
  • Help screen contents Each help screen is named. The name is used to implement context dependent help.
  • Key bindings Key binding tables are defined. You can define as many as you like (you can switch to a specific one with the keymap command), but the following must be provided:
    • main Editing windows
    • prompt Prompt windows
    • query Single-character query prompts
    • querya Single-character query for quote
    • querysr Single-character query for search and replace
    • shell Shell windows
    • vtshell Terminal emulator shell windows

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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: