xedit(1)
NAME
xedit − simple text editor for X
SYNOPSIS
xedit [ -toolkitoption ... ] [ filename ]
DESCRIPTION
Xedit provides a window consisting of the following four areas:
Commands SectionA set of commands that allow you to exit xedit, save the file, or load a new file into the edit window.
Message WindowDisplays xedit messages. In addition, this window can be used as a scratch pad.
Filename DisplayDisplays the name of the file currently being edited, and whether this file is Read-Write or Read Only.
Edit WindowDisplays the text of the file that you are editing or creating.
OPTIONS
Xedit accepts all of the standard X Toolkit command line options (see X11(7) ). 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.
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, 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-aBeginning Of LineMeta-bBackward Word
Ctrl-bBackward CharacterMeta-fForward Word
Ctrl-dDelete Next CharacterMeta-iInsert File
Ctrl-eEnd Of LineMeta-kKill To End Of Paragraph
Ctrl-fForward CharacterMeta-qForm Paragraph
Ctrl-gMultiply ResetMeta-vPrevious Page
Ctrl-hDelete Previous CharacterMeta-y Insert Current Selection
Ctrl-jNewline And IndentMeta-zScroll One Line Down
Ctrl-kKill To End Of LineMeta-dDelete Next Word
Ctrl-lRedraw DisplayMeta-DKill Word
Ctrl-mNewlineMeta-hDelete Previous Word
Ctrl-nNext LineMeta-HBackward Kill Word
Ctrl-oNewline And BackupMeta-<Beginning Of File
Ctrl-pPrevious LineMeta->End Of File
Ctrl-rSearch/Replace BackwardMeta-]Forward Paragraph
Ctrl-sSearch/Replace ForwardMeta-[Backward Paragraph
Ctrl-tTranspose Characters
Ctrl-uMultiply by 4Meta-Delete Delete Previous Word
Ctrl-vNext PageMeta-Shift Delete Kill Previous Word
Ctrl-wKill SelectionMeta-Backspace Delete Previous Word
Ctrl-yUnkillMeta-Shift Backspace Kill Previous Word
Ctrl-zScroll One Line Up
In addition, the pointer may be used to cut and paste text:
Button 1 DownStart Selection
Button 1 MotionAdjust Selection
Button 1 UpEnd Selection (cut)
Button 2 DownInsert Current Selection (paste)
Button 3 DownExtend Current Selection
Button 3 MotionAdjust Selection
Button 3 UpEnd Selection (cut)
COMMANDS
QuitQuits the current editing session. If any changes have not been saved, xedit displays a warning message, allowing the user to save the file.
SaveIf file backups are enabled (see RESOURCES, below) 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.
LoadLoads 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.
RESOURCES
For xedit the available resources are:
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 use “.BAK” as the suffix.
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/openwin/lib/app-defaults/Xedit specifies required resources
SEE ALSO
X11(7), xrdb(1), Athena Widget Set
RESTRICTIONS
There is no undo function.
COPYRIGHT
Copyright 1988, Digital Equipment Corporation.
Copyright 1989, Massachusetts Institute of Technology.
See X11(7) for a full statement of rights and permissions.
AUTHOR
Chris D. Peterson, MIT X Consortium
SunOS 5.5 — Last change: 24 January 1994