xedit

NAME

xedit - simple text editor for X

SYNOPSIS

xedit [-toolkitoption ... ] [filename]

DESCRIPTION

The xedit(1) utility provides a window consisting of the following four areas:

Commands Section
A set of commands you can use to exit xedit(1), save the file, or load a new file into the edit window.
Message Window
Displays xedit(1) 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.

OPTIONS

The xedit(1) utility accepts all of the standard X Toolkit command-line options (see X(5)). The order of the command-line options is not important.
filename
Specifies the file to be loaded during start-up. This is the file that will be edited. If a file is not specified, xedit(1) lets you load a file or create a new file after it has started up.

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, the key presses will have no effect on the application. This is also true for the special key sequences that pop-up dialog widgets, so typing Ctrl-s in the file name 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, but can be turned on through the Text widget's resources, see Athena Widget Set for the exact resource definition.

The following keystroke combinations are defined:

Ctrl-a Beginning Of Line
Ctrl-b Backward Character
Ctrl-d Delete Next Character
Ctrl-e End Of Line
Ctrl-f Forward Character
Ctrl-g Multiply Reset
Ctrl-h Delete Previous Character
Ctrl-j Newline And Indent
Ctrl-k Kill To End Of Line
Ctrl-l Redraw Display
Ctrl-m Newline
Ctrl-n Next Line
Ctrl-o Newline And Backup
Ctrl-p Previous Line
Ctrl-r Search/Replace Backward
Ctrl-s Search/Replace Forward
Ctrl-t Transpose Characters
Ctrl-u Multiply by 4
Ctrl-v Next Page
Ctrl-w Kill Selection
Ctrl-y Unkill
Ctrl-z Scroll One Line Up
Meta-b Backward Word
Meta-d Delete Next Word
Meta-D Kill Word
Meta-f Forward Word
Meta-H Backward Kill Word
Meta-h Delete Previous Word
Meta-i Insert File
Meta-k Kill To End Of Paragraph
Meta-q Form Paragraph
Meta-v Previous Page
Meta-y Insert Current Selection
Meta-z Scroll One Line Down
Meta-> End Of File
Meta-< Beginning Of File
Meta-[ Backward Paragraph
Meta-] Forward Paragraph
Meta-Backspace Delete Previous Word
Meta-Shift Backspace Kill Previous Word
Meta-Delete Delete Previous Word
Meta-Shift Delete Kill Previous Word

In addition, the pointer can be used to cut and paste text:

Button 1 Down Start Selection
Button 1 Motion Adjust Selection
Button 1 Up End Selection (cut)
Button 2 Down Insert Current Selection (paste)
Button 3 Down Extend Current Selection
Button 3 Motion Adjust Selection
Button 3 Up End Selection (cut)

COMMANDS

Quit
Quits the current editing session. If any changes have not been saved, xedit(1) displays a warning message allowing the user to save the file.
Save
If file backups are enabled (see RESOURCES, below) xedit(1) stores a copy of the original, unedited file in <prefix>file<suffix>, then overwrites the file with the contents of the edit window. The file name 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 asks the user to save the changes or press Load again.

RESOURCES

For xedit(1) the available resources are:

enableBackups (ClassEnableBackups)
Specifies that, when edits made to an existing file are saved, xedit(1) 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 (ClassBackupNamePrefix)
Specifies a string that is to be prepended to the backup file name. The default is that no string shall be prepended.
backupNameSuffix (ClassBackupNameSuffix)
Specifies a string that is to be appended to the backup file name. The default is to use ".BAK" as the suffix.

WIDGETS

In order to specify resources, it is useful to know the hierarchy of the widgets that compose xedit(1). 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 VARIABLES

DISPLAY
Contains the default host and display number.
XENVIRONMENT
Contains 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.

RESTRICTIONS

There is no undo function.

SEE ALSO

X(5)

xrdb(1)

Athena Widget Set