XEDIT(1)

NAME
xedit - simple text editor for X

SYNTAX
xedit [ -pollStdin | -waitStdin ] [ -toolkitoption ... ] [ filename | - ]

OPTIONS
Xedit accepts all of the standard X Toolkit command line options (see X(1)). The order of the command line options is not important.

filename
    Specifies the file that is to be loaded during start-up. This is the file which will be edited. If a file is not specified, xedit lets you load a file or create a new file after it has started up. If the name “-” is given xedit reads from the program standard input.

-pollStdin
    When reading from standard input xedit will not wait until all the input has been read before displaying the file. This option makes xedit behave like more(1). While the input is being read new input will appear at the end of the display. The display will scroll down if necessary to show the new text. The current text may be saved at any time by entering a file name into the file name field and selecting Save.

-waitStdin
    When reading from standard input causes xedit to wait for the end of input before displaying the text. (The reverse of the -pollStdin option).

Xedit may also be invoked as xless or xmore. In these cases if no file name is given input is read from the standard input of the program (as though - was given as the file name) and the -pollStdin option is switched on (unless overridden by -waitStdin).

DESCRIPTION
Xedit provides a window consisting of the following four areas:

Commands Section
    A set of commands that allow you to exit xedit, save the file, or load a new file into the edit window.

Message Window
    Displays xedit messages. In addition, this window can be used as a scratch pad.

Filename Display
    Displays the name of the file currently being edited, and whether this file is Read - Write or Read Only.

Edit Window
    Displays the text of the file that you are editing or creating.

EDITING
The Athena Text widget is used for the three sections of this application that allow text input. The characters typed will go to the Text widget that the pointer cursor is currently over. If the pointer cursor is not over a text widget then the keypresses will have no effect on the application. This is also true for the special key sequences that popup dialog widgets, so typing Control-S in the filename widget will enable searching in that widget, not the edit widget.

Both the message window and the edit window will create a scrollbar if the text to display is too large to fit in that window. Horizontal scrolling is not allowed by default in the message window, but can be turned on through the Text widget's resources, see Athena Widget Set for the exact resource definition.

COMMANDS

Quit
    Quits the current editing session. If any changes have not been saved (including input from the standard input), xedit displays a warning message, allowing the user to save the file.

Save
    If file backups are enabled (see RESOURCES) xedit stores a copy of the original, unedited file in <prefix>file<suffix>, then overwrites the file with the contents of the edit window. The filename is retrieved from the Text widget directly to the right of the Load button.

Load
    Loads the file named in the text widget immediately to the right of the this button and displays it in the Edit window. If the currently displayed file has been modified a warning message will ask the user to save the changes, or press load again. Using this option prevents xedit from reading further input from standard input.

RESOURCES
For xedit the available resources are:

pollStdin (Class PollStdin)
    Specifies that, if standard input is being read, xedit should not wait for end of file before displaying the input. This has the default value of "no", unless the program is invoked as xless or xmore in which case it has the default value of "yes".

enableBackups (Class EnableBackups)
    Specifies that, when edits made to an existing file are saved, xedit is to copy the original version of that file to <prefix>file<suffix> before it saves the changes. The default value for this resource is "off", stating that no backups should be created.

backupNamePrefix (Class BackupNamePrefix)
    Specifies a string that is to be prepended to the backup filename. The default is that no string shall be prepended.

backupNameSuffix (Class BackupNameSuffix)
    Specifies a string that is to be appended to the backup filename. The default is to append the string ".BAK".

WIDGETS
In order to specify resources, it is useful to know the hierarchy of the widgets which compose xedit. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name.

Xedit  xedit
	Paned  paned
		Paned  buttons
			Command  quit
			Command  save
			Command  load
			Text  filename
		Label  bc_label
		Text  messageWindow
		Label  labelWindow
		Text  editWindow

ENVIRONMENT

DISPLAY
    to get the default host and display number.

XENVIRONMENT
    to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.

FILES
/usr/lib/X11/app-defaults/Xedit - specifies required resources

SEE ALSO
X(1), xrdb(1), Athena Widget Set

RESTRICTIONS
There is no undo function. While reading from standard input it is not possible to prevent the display scrolling to the bottom when new input is available.

COPYRIGHT
Copyright 1988, Digital Equipment Corporation.
Copyright 1989, Massachusetts Institute of Technology.
See X(1) for a full statement of rights and permissions.

AUTHOR
Chris D. Peterson, MIT X Consortium