.TH "xe" "8" "2001" "Xenon 1\&.0\&.0" "" .PP .SH "NAME" xe \- a text editor for X .PP .SH "SYNOPSIS" .PP \fBxe\fP [\fB-display\fP \fIdisplay name\fP] [\fB-geometry\fP \fIgeometry spec\fP] [\fB-v\fP] [\fB-nofork\fP] [\fB-orphan\fP] [\fIfilename\fP] .PP .SH "DESCRIPTION" .PP \fIxe\fP is a lightweight, fast and simple text editor for X\&. The user interface consists of a fairly standard layout, with a menu bar along the top of the window, a scroll bar on the left side and the rest filled with the text area\&. .PP Some simple searching and editing functions are available\&. \fIxe\fP is able to open multiple files, however the file selection user interface is quite crude at the moment\&. .PP The command keys of the menu commands as well as the key mapping of most text field operations are configurable via X resources\&. \fIxe\fP has a configuration file of its own: \fI~/\&.xerc\fP which is read at startup, see the section \fBSTARTUP\fP\&. .PP \fBNote\fP: whenever this man page refers to the \fIAlt\fP key it refers to the X Mod1 modifier\&. .PP .SH "OPTIONS" .PP .IP "\fB-display\fP \fIdisplay name\fP" Run on a specific display other than what is specified in the \fIDISPLAY\fP environment variable\&. .IP .IP "\fB-geometry\fP \fIgeometry spec\fP" Provide a custom position and size for \fIxe\fP when it starts up\&. The format of the geometry string is the standard X geometry spec, with the \fIwidth\fP and \fIheight\fP parameters providing the number of rows and columns of the text field\&. .IP .IP "\fB-v\fP" Prints out version number and exits\&. .IP .IP "\fB-nofork\fP" By default \fIxe\fP forks itself into the background\&. The \fI-nofork\fP option prevents this behavoir\&. .IP .IP "\fB-orphan\fP" If runOnce is enabled (in the \fI\&.xerc\fP file) this option disables it, making \fIxe\fP create a new process each time it is run\&. .IP .PP .SH "STARTUP" .PP Upon startup \fIxe\fP reads in \fIfilename\fP as specified on the command line\&. If no file was given, then xe opens an empty window with the name "Untitled"\&. If there is some kind of error reading from \fIfilename\fP, a blank window is opened anyway and an error message appears in the centre of the screen\&. .PP Configurable options are read in as follows: .IP "\fIX Resources\fP" First the standard X resource files and command line options are read\&. see the section \fBX RESOURCES\fP for a complete description of the X resources recognised by \fIxe\fP\&. .IP .IP "\fI~/\&.xerc\fP" Then, various global options are read in from the \fI\&.xerc\fP file in the home directory of the user ID that \fIxe\fP was launched under\&. These options apply to specific parts of \fIxe\fP and all of these options may eventually end up as X resources\&. See the section \fBXERC\fP for a complete description of these options\&. .PP .SH "MOUSE" .PP The mouse functions as expected for a mouse-based editor\&. The following operations are defined in the text area\&. .PP .IP "\fILeft Button\fP" positions the caret in the text area, clearing any selection\&. Clicking and dragging extends the selection from the initial position, combined with the \fIShift Key\fP this extends an already existing selection\&. .IP .IP "\fIMiddle Button\fP" operates the same way as the Left Button, except that whole words are selected instead of single characters\&. Combining with the \fIAlt Key\fP, the caret is positioned and when the button is released, the current \fIX Selection\fP is inserted at that position\&. .IP .IP "\fIRight Button\fP" pans the text around in 2 dimensions, following the mouse pointer and auto-scrolls off the top or bottom of the text\&. .PP The scroll bar works as expected\&. The \fIMiddle Button\fP moves the scroll handle to the centre of the position clicked\&. .PP In text fields, the \fIMiddle Button\fP pastes from the X Selection without needing the Alt modifier\&. .PP .SH "KEYBOARD" .PP The keyboard works in the standard way\&. Normal characters are inserted, defined text area operations such as caret movement, and selection etc can be invoked, as well as command keys defined by the menus\&. .PP The various text operations and menu commands, with their default keys are described below\&. .PP .SH "X RESOURCES" .PP The X resources documented here are the only ones supported by \fIxe\fP at the moment\&. Future versions will recognise more of them\&. .PP A form of X resource that \fIxe\fP uses is \fIKey Spec\fP which is used to specifiy a key with a combination of modifiers\&. The format of this is: [ \fImodifier modifier\&.\&.\&.\fP ] \fI\fP where \fImodifier\fP can be one of \fIShift\fP, \fIAlt\fP or \fICtrl\fP and \fI\fP is an X \fIkeysym\fP name, without the leading XK_\&. The list of X keysyms can be found in the file \fI/usr/include/X11/keysymdef\&.h\fP\&. .PP .IP "\fBgeometry\fP" Specifies the position and size (in lines and columns) of all top level windows\&. Same as the \fB-geometry\fP flag\&. .PP \fBMenus\fP .PP The only resource recognised by menu items is \fBkey\fP, which takes a value of the form \fIKey Spec\fP:\fI\fP where \fIKey Spec\fP is the command key used and \fI\fP is the label that represents the key in the menu\&. The menus, with the resource name for each menu item, the default value of the \fBkey\fP resource and a description of each menu item are shown below\&. .PP \fBFile Menu\fP - \fB*mainWindow\&.menuBar\&.file\fP .PP .IP "\fBnew\fP (Alt n:n)" Creates a new "Untitled" editor window\&. .IP "\fBopen\fP (Alt o:o)" Prompts for a filename (with a crude-looking file chooser) and opens it in a new editor window\&. .IP .IP "\fBclose\fP (Alt w:w)" Closes the current editor window\&. \fBNote\fP, this command doesn\'t prompt when the file is unsaved\&. .IP .IP "\fBreopen\fP (Alt Shift r:r)" Re-reads the file from the disk, discarding any changes\&. .IP .IP "\fBsave\fP (Alt s:s)" Saves the text\&. Prompts for a filename if the window is "Untitled"\&. The file is written to disk even if the text hasn\'t been modified since last save\&. .IP .IP "\fBquit\fP (Alt q:q)" Quits the program\&. The user is only prompted if when there are unsaved editor windows open\&. .PP \fBEdit Menu\fP - \fB*mainWindow\&.menuBar\&.edit\fP .PP .IP "\fBundo\fP (Alt z:z)" Un-does the previous operation\&. An operation consists of the change of selection (including caret position) or the insertion or removal of text by any means\&. .IP .IP "\fBredo\fP (Alt r:r)" Re-does the the operation that was last undone\&. All redo events are cleared when a new operation is performed\&. .IP .IP "\fBcut\fP (Alt x:x)" Copies the selected text into the \fIxe\fP clipboard and then deletes the text\&. .IP .IP "\fBcopy\fP (Alt c:c)" Copies the selected text into the \fIxe\fP clipboard\&. \fBNote\fP, this clipboard is not the X clipboard but a separate buffer that is shared among all \fIxe\fP processes\&. .IP .IP "\fBpaste\fP (Alt v:v)" Inserts the text in the \fIxe\fP clipboard in place of the current selection\&. .IP .IP "\fBclear\fP" Deletes selected text\&. .IP .IP "\fBselectAll\fP (Alt a:a)" Selects all of the text\&. .IP .IP "\fBxpaste\fP (Alt p:p)" Same as \fIpaste\fP but gets the data from the X clipboard (the X client that holds the X selection)\&. .IP .IP "\fBtabToggle\fP (Alt t:t)" Toggles the tab width between the two set up in the \fI\&.xerc\fP file\&. .PP \fBSearch Menu\fP - \fB*mainWindow\&.menuBar\&.search\fP .PP .IP "\fBfind\fP (Alt h:h)" Brings up the \fIFind\fP dialog box\&. The search string, search direction, case sensitivity and type of search can be entered here\&. Pressing the Ok button will execute the search\&. .IP .IP "\fBfindAgain\fP (Alt g:g)" Repeats the previous search, using all the previously set parameters\&. .IP .IP "\fBfindForward\fP (Alt f:f)" If some text is selected and the selection is only on a single line, the search string is replaced with this text and the next occurence is searched for\&. Otherwise, \fIfindAgain\fP is performed with the search direction set to forward\&. .IP .IP "\fBfindBackwards\fP (Alt b:b)" The same as \fIfindForward\fP except the search direction is always set to backwards\&. .IP .IP "\fBjumpTo\fP (Alt j:j)" Brings up the \fIJump\fP dialog box\&. A line number can be entered here\&. Choosing Ok will cause the cursor to jump to the beginning of the given line\&. .IP .IP "\fBbraceMatch\fP (Alt m:m)" Selects the text encompassed by the closest set of closed braces around the current cursor position\&. .IP .PP \fBWindow Menu\fP .PP This menu contains a list of all editor windows currently opened by the current running process of xe\&. The name displayed is the same as the window\'s icon name\&. X resources can\'t be set on individual menu items in this menu at the moment\&. .PP \fBText\fP - \fB*mainWindow\&.text\fP .PP The various resources with their default resource and description are shown below\&. All these resources take a \fIKey Spec\fP as their value\&. X resources are not supported by text fields at the moment\&. .PP .IP "\fBup\fP (Up)" Move the caret up one line\&. .IP "\fBdown\fP (Down)" Move the caret down one line\&. .IP "\fBleft\fP (Left)" Move the caret left by one character\&. .IP "\fBright\fP (Right)" Move the caret right by one character\&. .IP "\fBextend_up\fP (Shift Up)" Extend the selection up one line\&. .IP "\fBextend_down\fP (Shift Down)" Extend the selection down one line\&. .IP "\fBextend_left\fP (Shift Left)" Extend the selection left by one character\&. .IP "\fBextend_right\fP (Shift Right)" Extend the selection right by one character\&. .IP "\fBprev_word\fP (Alt Left)" Move the caret left by one word\&. .IP "\fBnext_word\fP (Alt Right)" Move the caret right by one word\&. .IP "\fBextend_prev_word\fP (Alt Shift Left)" Extend the selection left by one word\&. .IP "\fBextend_next_word\fP (Alt Shift Right)" Extend the selection right by oe word\&. .IP "\fBstart_line\fP (Ctrl Left)" Move the caret to the beginning of the line\&. .IP "\fBend_line\fP (Ctrl Right)" Move the caret to the end of the line\&. .IP "\fBextend_start_line\fP (Ctrl Shift Left)" Extend the selection to the beginning of the line\&. .IP "\fBextend_end_line\fP (Ctrl Shift Right)" Extend the selection to the end of the line\&. .IP "\fBpage_up\fP (Page_Up)" Move caret up a page\&. .IP "\fBpage_down\fP (Page_Down)" Move caret down a page\&. .IP "\fBhome\fP (Home)" Move caret to the beginning of the file\&. .IP "\fBend\fP (End)" Move caret to the end of the file\&. .PP The following colours can be set using X colour names\&. These resources also apply to \fB*mainWindow\&.textField\fP\&. .PP .IP "\fBbackground\fP (grey85)" .IP "\fBforeground\fP (black)" .IP "\fBlineNumColour\fP (blue)" .IP "\fBactiveColour\fP (red)" .IP "\fBinactiveColour\fP (grey50)" .PP .SH "XERC" .PP The \fI\&.xerc\fP file contains token-value pairs on each line\&. A # symbol causes the rest of the line to be ignored\&. The token-value is separated by any whitespace\&. Here is a list of all recognised tokens with their default value in parentheses: .PP .IP "\fBwindowName\fP (%m*%%F%r [view-only]%)" Format string for the title of the top level windows\&. This string can contain any character along with special option strings which are substituted with various things: .IP \fI%m%\fP is shown when the text is modified\&. .IP \fI%r%\fP is shown when the text is read-only\&. .IP \fI%F\fP full path name of file being edited\&. .IP \fI%f\fP filename without path component of file being edited\&. .IP .IP "\fBiconName\fP (%r[ %%m*%%f%r ]%)" Format string for the icon name of all top level windows\&. Same format as \fIwindowName\fP\&. .IP .IP "\fBlines\fP (30)" The initial height in lines of the text area\&. .IP "\fBcolumns\fP (80)" The initial width in characters of the text area\&. .IP "\fBfont\fP (-b&h-lucidatypewriter-medium-r-normal-sans-12*)" The font that is displayed in all text widgets\&. .IP .IP "\fBbreakChars\fP (=(),*\&.;{}[]<>""-+/&|~^?!:)" The characters that are used as boundaries for word selection\&. Whitespace and newlines are implicit boundaries\&. .IP .IP "\fBlineNumbers\fP (true)" Display of line numbers\&. Can be true or false\&. .IP .IP "\fBautoIndent\fP (true)" Auto indent causes initial whitespace from the current line to be copied onto the next when the \fIenter\fP key is pressed\&. .IP .IP "\fBtab\fP (8)" Sets the tab width of the text area\&. .IP "\fBtabToggle\fP (4)" Sets an alternate tab width, switched to using the \fITab Toggle\fP menu command\&. .IP .IP "\fBsoftTab\fP (4)" Sets the tab width the tab key uses\&. If its width is less than the current tab width then the columns are filled up with spaces\&. Spaces are collapsed into tabs when the tab is wide enough to fill the necessary space\&. .IP .IP "\fBmaxUndos\fP (100)" This is the maximum number of keystrokes and selection events that are saved by each text area\&. .IP .IP "\fBscrollTimeout\fP (0\&.03)" Time interval in seconds between successive scroll steps when auto scrolling\&. .IP .IP "\fBscrollAccel\fP (1\&.0)" Controls auto-scroll acceleration\&. A lower number increases acceleration\&. .IP .IP "\fBscrollAmt\fP (2)" Configures the number of lines scrolled when using the up and down keys to scroll beyond the bounds of the visible text\&. .IP .IP "\fBrightScroll\fP (false)" Causes the scrollbar to appear on the right hand side of the window if set to true\&. .IP .IP "\fBrunOnce\fP (false)" When false, running xe creates a new process each time\&. When true, a new window is opened in a currently running process with the same client IP number and userid as the original process\&. .IP .IP "\fBusePlanemask\fP (true)" When true, xe uses the X planemask to draw selection hilights\&. If selection highlights are slow, then hardware planemasks are not supported on your graphics card by X\&. You can improve performance of selection hilights by setting this value to false, such that the planemask isn\'t used\&. .IP .PP .SH "FILES" .PP \fIxe\fP reads in the standard X resource files as well as its own configuration file: \fI~/\&.xerc\fP\&. .PP .SH "SEE ALSO" .PP X(1) .PP .SH "DIAGNOSTICS" .PP \fIxe\fP reports file-open errors in dialog boxes\&. Some other more obscure errors may happen and these are printed to \fIstderr\fP\&. .PP .SH "BUGS" .PP There are quite a few bugs in \fIxe\fP, most of which are not serious, that is they are mostly redraw/display related and don\'t affect the content of the text being edited\&. For a semi-complete list of bugs see the \fBBUGS\fP file that comes with the \fIxe\fP distribution\&. .PP .SH "AUTHOR" .PP Ben Ross (ben@proximity\&.com\&.au) .PP Brian Murray - provided some excellent C++ classes\&.