X Resources

XNEdit has additional options to those provided in the Preferences menu which are set using X resources. Like most other X programs, XNEdit can be customized to vastly unnecessary proportions, from initial window positions down to the font and shadow colors of each individual button (A complete discussion of how to do this is left to books on the X Window System). Key binding (see "Key Binding" is one of the most useful of these resource settable options.

X resources are usually specified in a file called .Xdefaults or .Xresources in your home directory (on VMS this is sys$login:decw$xdefaults.dat). On some systems, this file is read and its information attached to the X server (your screen) when you start X. On other systems, the .Xdefaults file is read each time you run an X program. When X resource values are attached to the X server, changes to the resource file are not available to application programs until you either run the xrdb program with the appropriate file as input, or re-start the X server.

Selected X Resource Names

The following are selected XNEdit resource names and default values for XNEdit options not settable via the Preferences menu (for preference resource names, see your XNEdit preference file):

nedit.tagFile: (not defined)

This can be the name of a file, or multiple files separated by a colon (:) character, of the type produced by Exuberant Ctags or the Unix ctags command, which XNEdit will load at startup time (see ctags support). The tag file provides a database from which XNEdit can automatically open files containing the definition of a particular subroutine or data type.

nedit.alwaysCheckRelativeTagsSpecs: True

When this resource is set to True, and there are tag files specified (with the nedit.tagFile resource, see above) as relative paths, XNEdit will evaluate these tag value paths whenever a file is opened. All accessible tag files will be loaded at this time. When this resource value is False, relative path tag specifications will only be evaluated at XNEdit startup time.

nedit.wordDelimiters: .,/\\`'!@#%^&*()-=+{}[]":;<>?

The set of characters which mark the boundaries between words. In addition to these, spaces, tabs, and newlines are always word boundaries.

These boundaries take effect for the move-by-word (Ctrl+Arrow) and select-word (double click) commands, and for doing regex searches using the \B, < and > tokens.

Note that this default value may be overridden by the setting in Preferences -> Default Settings -> Language Modes....

nedit.remapDeleteKey: False

Setting this resource to True forcibly maps the delete key to backspace. This can be helpful on systems where the bindings have become tangled, and in environments which mix systems with PC style keyboards and systems with DEC and Macintosh keyboards. Theoretically, these bindings should be made using the standard X/Motif mechanisms, outside of XNEdit. In practice, some environments where users access several different systems remotely, can be very hard to configure. If you've given up and are using a backspace key halfway off the keyboard because you can't figure out the bindings, set this to True.

nedit.typingHidesPointer: False

Setting this resource to True causes the mouse pointer to be hidden when you type in the text area. As soon as the mouse pointer is moved, it will reappear. This is useful to stop the mouse pointer from obscuring text.

nedit.overrideDefaultVirtualKeyBindings: Auto

Motif uses a virtual key binding mechanism that shares the bindings between different Motif applications. When a first Motif application is started, it installs some default virtual key bindings and any other Motif application that runs afterwards, simply reuses them. Obviously, if the first application installs an invalid set, all others applications may have problems.

In the past, XNEdit has been the victim of invalid bindings installed by other applications several times. Through this resource, XNEdit can be instructed to ignore the bindings installed by other applications, and use its own private bindings. By default, XNEdit tries to detect invalid bindings and ignore them automatically (Auto). Optionally, XNEdit can be told to always keep the installed bindings (Never), or to always override them (Always).

nedit.stdOpenDialog: False

Setting this resource to True restores the standard Motif style of Open dialog. XNEdit file open dialogs are missing a text field at the bottom of the dialog, where the file name can be entered as a string. The field is removed in XNEdit to encourage users to type file names in the list, a non-standard, but much faster method for finding files.

nedit.bgMenuButton: ~Shift~Ctrl~Meta~Alt<Btn3Down>

Specification for mouse button / key combination to post the background menu (in the form of an X translation table event specification). The event specification should be as specific as possible, since it will override less specific translation table entries.

nedit.maxPrevOpenFiles: 30

Number of files listed in the Open Previous sub-menu of the File menu. Setting this to zero disables the Open Previous menu item and maintenance of the XNEdit file history file.

nedit.printCommand: (system specific)

Command used by the print dialog to print a file, such as, lp, lpr, etc.. The command must be capable of accepting input via stdin (standard input).

nedit.printCopiesOption: (system specific)

Option name used to specify multiple copies to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no "Number of Copies" item will appear in the print dialog.

nedit.printQueueOption: (system specific)

Option name used to specify a print queue to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no "Queue" item will appear in the print dialog.

nedit.printNameOption: (system specific)

Option name used to specify a job name to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no job or file name will be attached to the print job or banner page.

nedit.printHostOption: (system specific)

Option name used to specify a host name to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no "Host" item will appear in the print dialog.

nedit.printDefaultQueue: (system specific)

The name of the default print queue. Used only to display in the print dialog, and has no effect on printing.

nedit.printDefaultHost: (system specific)

The node name of the default print host. Used only to display in the print dialog, and has no effect on printing.

nedit.visualID: Best

If your screen supports multiple visuals (color mapping models), this resource allows you to manually choose among them. The default value of "Best" chooses the deepest (most colors) visual available. Since XNEdit does not depend on the specific characteristics of any given color model, Best probably IS the best choice for everyone, and the only reason for setting this resource would be to patch around some kind of X server problem. The resource may also be set to "Default", which chooses the screen's default visual (often a color-mapped, PseudoColor, visual for compatibility with older X applications). It may also be set to a numeric visual-id value (use xdpyinfo to see the list of visuals supported by your display), or a visual class name: PseudoColor, DirectColor, TrueColor, etc..

If you are running under a themed environment (like KDE or CDE) that places its colors in a shallow visual, and you'd rather have that color scheme instead of more colors available, then you may need set the visual to "Default" so that XNEdit doesn't choose one with more colors. (The reason for this is: if the "best" visual is not the server's default, then XNEdit cannot use the colors provided by your environment. XNEdit will fall back to its own default color scheme.)

nedit.installColormap: False

Force the installation of a private colormap. If you have a humble 8-bit color display, and netscape is hogging all of the color cells, you may want to try turning this on. On most systems, this will result in colors flashing wildly when you switch between XNEdit and other applications. But a few systems (SGI) have hardware support for multiple simultaneous colormaps, and applications with installed colormaps are well behaved.

nedit.findReplaceUsesSelection: False

Controls if the Find and Replace dialogs are automatically loaded with the contents of the primary selection.

nedit.stickyCaseSenseButton: True

Controls if the "Case Sensitive" buttons in the Find and Replace dialogs and the incremental search bar maintain a separate state for literal and regular expression searches. Moreover, when set to True, by default literal searches are case insensitive and regular expression searches are case sensitive. When set to False, the "Case Sensitive" buttons are independent of the "Regular Expression" toggle.

nedit.multiClickTime: (system specific)

Maximum time in milliseconds allowed between mouse clicks within double and triple click actions.

nedit.undoModifiesSelection: True

By default, XNEdit selects any text inserted or changed through a undo/redo action. Set this resource to False if you don't want your selection to be touched.

nedit*scrollBarPlacement: BOTTOM_RIGHT

How scroll bars are placed in XNEdit windows, as well as various lists and text fields in the program. Other choices are: BOTTOM_LEFT, TOP_LEFT, or TOP_RIGHT.

nedit*text.autoWrapPastedText: False

When Auto Newline Wrap is turned on, apply automatic wrapping (which normally only applies to typed text) to pasted text as well.

nedit*text.heavyCursor: False

For monitors with poor resolution or users who have difficulty seeing the cursor, makes the cursor in the text editing area of the window heavier and darker.

nedit.autoScrollVPadding: 4

Number of lines to keep the cursor away from the top or bottom line of the window when the "Auto-Scroll Near Window Top/Bottom" feature is enabled. Keyboard operations that would cause the cursor to get closer than this distance cause the window to scroll up or down instead, except at the beginning of the file. Mouse operations are not affected.

nedit*text.blinkRate: 500

Blink rate of the text insertion cursor in milliseconds. Set to zero to stop blinking.

nedit*text.Translations:

Modifies key bindings (see "Key Binding").

nedit*foreground: black

Default foreground color for menus, dialogs, scroll bars, etc..

nedit*background: #b3b3b3

Default background color for menus, dialogs, scroll bars, etc..

nedit*calltipForeground: black

Foreground color for calltips

nedit*calltipBackground: LemonChiffon1

Background color for calltips

nedit*XmLFolder.inactiveForeground: #666

Foreground color for inactive tabs.

nedit*fontList: helvetica medium 12 points

Default font for menus, dialogs, scroll bars, etc..

nedit.helpFont: helvetica medium 12 points

Font used for displaying online help.

nedit.boldHelpFont: helvetica bold 12 points

Bold font for online help.

nedit.italicHelpFont: helvetica italic 12 points

Italic font for online help.

nedit.fixedHelpFont: courier medium 12 points

Fixed font for online help.

nedit.boldFixedHelpFont: courier bold 12 points

Fixed bold for online help.

nedit.italicFixedHelpFont: courier italic 12 points

Fixed italic font for online help.

nedit.h1HelpFont: helvetica bold 14 points

Font for level-1 titles in help text.

nedit.h2HelpFont: helvetica bold italic 12 points

Font for level-2 titles in help text.

nedit.h3HelpFont: courier bold 12 points

Font for level-3 titles in help text.

nedit.helpLinkFont: helvetica medium 12 points

Font for hyperlinks in the help text

nedit.helpLinkColor: #009900

Color for hyperlinks in the help text

nedit.backlightCharTypes:  0-8,10-31,127:red;9:#dedede;32,160-255:#f0f0f0;128-159:orange

NOTE: backlighting is experimental (see "Programming with XNEdit").

A string specifying character classes as ranges of ASCII values followed by the color to be used as their background colors. The format is:

low[-high]{,low[-high]}:color{;low-high{,low[-high]}:color}

where low and high are ASCII values.

For example:

    32-255:#f0f0f0;1-31,127:red;128-159:orange;9-13:#e5e5e5

nedit.focusOnRaise: False

This resource determines whether new text windows and text windows that are raised, should also request the input focus. Conventionally, it is the task of the window manager to decide on which window gets the input focus. Therefore, XNEdit's default behaviour is not to request the input focus explicitly.

nedit.forceOSConversion: True

By default, XNEdit converts texts in DOS or Mac format to an internal format using simple newlines as line dividers. This is sometimes not wanted by the user and can be prevented by setting this resource to False.

Note: Setting this to False would supress newlines in Mac files entirely, leaving the control character <cr> where every line feed would be. Mac OS X uses Unix files and is not affected.

Note: Setting this to False while the option 'Terminate with Line Break on Save' is active could lead to file corruption.

nedit.truncSubstitution: Fail

XNEdit has a fixed limit on substitution result string length. This resource modifies the behaviour if this limit is exceeded. Possible values are Silent (will silently fail the operation), Fail (will fail the operation and pop up a dialog informing the user), Warn (pops up a dialog warning the user, offering to cancel the operation) and Ignore (will silently conclude the operation).

WARNING: Setting this to 'Ignore' will destroy data without warning!

nedit.honorSymlinks: True

If set to True, XNEdit will open a requested file on disk even if it is a symlink pointing to a file already opened in another window. If set to false, XNEdit will try to detect these cases and just pop up the already opened document.

nc.autoStart: True 

Whether the xnc program should automatically start an XNEdit server (without prompting the user) if an appropriate server is not found.

nc.serverCommand: xnedit -server

Command used by the xnc program to start an XNEdit server.

nc.timeOut: 10

Basic time-out period used in communication with an XNEdit server (seconds).


The following are Selected widget names (to which you may append .background, .foreground, .fontList, etc., to change colors, fonts and other characteristics):

nedit*statsAreaForm

Statistics line and incremental search bar. To get consistent results across the entire stats line and the incremental search bar, use '*' rather than '.' to separate the resource name. For example, to set the foreground color of both components use:

    nedit*statsAreaForm*foreground
instead of:
    nedit*statsAreaForm.foreground

nedit*menuBar

Top-of-window menu-bar.

nedit*textHorScrollBar

Horizontal scroll bar.

nedit*textVertScrollBar

Vertical scroll bar.