Previous Section  < Day Day Up >  Next Section

Recipe 6.3. Customizing JOE

6.3.1 Problem

JOE has many personalities and command-line options. You want it to have customized defaults, so at startup everything is just the way you want it.

6.3.2 Solution

Create a personalized .joerc file containing your preferences, and put it in your home directory.

First take a peek in /etc/joe, because that's where JOE's default initialization files are:

$ ls /etc/joe

jmacsrc  joerc  jpicorc  jstarrc  rjoerc  terminfo

This example uses joerc—just plain ole JOE, not pretending to be anyone else. Copy it to your home directory, make it a hidden file, and keep the filename:

$ joe -linums -help /etc/joe/joerc

^K D

Name of file to save (^C to abort): ~/.joerc

Could not make backup file.  Save anyway (y,n,^C)? Y

File ~/.joerc saved

^ means the Ctrl key. Don't worry about case; K D is the same as k d.

While .joerc lets you micromanage every last little thing, the first two sections contain the most useful options. For example:

-marking       Text between ^K B and cursor is highlighted

               (use with -lightoff)

-force         Force final newline when files are saved

-lightoff      Turn off highlighting after block copy or

               move

-exask         ^K X always confirms filename

-beep          Beep on errors and when cursor goes past

               extremes

-keepup        %k and %c status-line escape sequences

               updated frequently

-help          Start with help on

-linums        Enable line numbers on each line

Inactive options have a leading space or tab. To activate an option, simply delete the leading space, and make sure the line is all the way flush left.

6.3.3 Discussion

A nice feature of JOE is that your work is done in a copy of the original file. The original file is saved as a backup file. (This is a configurable option that can be turned off in .joerc.)

6.3.4 See Also

    Previous Section  < Day Day Up >  Next Section