next up previous contents index
Next: The WR Button: Email Up: Introduction to Xic Previous: Button 4, Mouse Wheel   Contents   Index


The Text Editor

Xic provides a general-purpose text editor window. It is used for editing text files or blocks, and may be invoked in read-only mode for use as a file viewer. In that mode, commands which modify the text are not available.

The following commands are found in the File menu of the editor. Not all of these commands may be available, for example the Open button is absent when editing text blocks.

Open
Bring up the File Selection panel. This may be used to select a file to load into the editor. This is the same file manager available from the Open button in the Xic File Menu.

Load
Bring up a dialog which solicits the name of a file to edit. If the current document is modified and not saved, a warning will be issued, and the file will not be loaded. Pressing Load a second time will load the new file, discarding the current document. The editor is sensitive as a drop receiver. If a file is dragged into the editor and dropped, and neither of the Load or Read dialogs is visible, the Load dialog will appear with the name of the dropped file preloaded into the dialog text area. If the drop occurs with the Load dialog visible, the dropped file name will be entered into the Load dialog.

Read
Bring up a dialog which solicits the name of a file whose text is to be inserted into the document at the cursor position. When this pop-up is visible, and a file is dragged into the editor and dropped, the name of that file is entered into the dialog text area.

Save
Save the document to disk, or back to the application if editing a text block under the control of some command.

Save As
Pop up a dialog which solicits a new file name to save the current document under. If there is selected text, the selected text will be saved, not the entire document.

Print
Bring up a pop-up which enables the document to be printed to a printer, or saved to a file.

Write DOS
This menu item appears only in the Windows version. It controls the line termination format used in files written by the text editor. The default is to use the archaic DOS two-byte termination. If this button is unset, the more modern and efficient Unix-style termination is used. Older Windows programs such as Notepad require DOS termination. Most newer objects and programs can use either format, as can the XicTools programs.

Quit
Exit the editor. If the document is modified and not saved, a warning is issued, and the editor is not exited. Pressing Quit again will exit the editor without saving.

The editor can also be dismissed with the window manager ``dismiss window'' function, which may be an `X' button in the title bar. This has the same effect as the Quit button.

The following commands are found in the Edit menu of the text editor.

Cut
Delete selected text to an internal buffer (the ``clipboard'').

Copy
Copy selected text to the clipboard.

Paste
Paste the contents of the clipboard into the document at the cursor location.

The following commands are found in the Options menu of the editor.

Search
Pop up a dialog which solicits a regular expression to search for in the document. The up and down arrow buttons will perform the search, in the direction of the arrows. If the No Case button is active, case will be ignored in the search. The next matching text in the document will be highlighted. If there is no match, ``not found'' will be displayed in the message area of the pop-up.

Font
This brings up a tool for selecting the font to use in the text window. Selecting a font will change the present font, and will set the default font for new text editor class windows. This includes the file browser and mail client pop-ups.

Unless a font is set with the Font button, text editor windows will use a font defined in the XEDITOR_FONT environment variable, if set. Under Unix/Linux, in gtk1 releases this variable can be set to the X font description name of an X font. In gtk2 releases, a Pango font description string is expected. Under Windows, the variable is set to a string in the form ``face_name pixel_height'' or the deprecated form ``(pixel_height)face_name''. Examples are ``Lucida Console 10'' or ``(10)Lucida Console''.

Characters are entered into the document as typed, at the current cursor location. The keys with special bindings are listed below.

Unix/Linux Bindings
Ctrl-A Move cursor to beginning of line
Ctrl-B Move cursor backward one character
Ctrl-C Copy selected text to clipboard
Ctrl-D Delete next character
Ctrl-E Move cursor to end of line
Ctrl-F Move cursor forward one character
Ctrl-H Delete previous character
Ctrl-N Move cursor down one line
Ctrl-P Move cursor up one line
Ctrl-U Delete current line
Ctrl-V Paste clipboard at cursor
Ctrl-W Delete backward one word
Ctrl-X Cut selection to clipboard
   
Alt-B Move cursor backward one word
Alt-D Delete word
Alt-F Move cursor forward one word
   
Home Move cursor to beginning of line
Ctrl-Home Move cursor to top of document
End Move cursor to end of line
Ctrl-End Move cursor to end of document
PageUp Move up one page
PageDown Move down one page
Up Move cursor up one line
Down Move cursor down one line
Left Move cursor left one character
Ctrl-Left Move cursor left one word
Right Move cursor right one character
Ctrl-Right Move cursor right one word
Backspace Delete previous character
Ctrl-Backspace Delete previous word
Clear Delete current line
Shift-Insert Paste clipboard at cursor
Ctrl-Insert Copy selected text to clipboard
Delete Delete next character
Shift-Delete Cut selected text to clipboard
Ctrl-Delete Delete next word

Clicking with button 1 will move the cursor to that location. Double clicking will select the clicked-on word. Triple clicking will select the clicked-on line. Button 1 is also used to select text by dragging the pointer over the text to select.

Clicking with button 2 will paste the contents of the clipboard (or any selected text) into the document at the click location. Button 3 will also select text, but the selected text is not copied to the clipboard.

Microsoft Windows Bindings
Ctrl-A Select all text
Ctrl-C Copy selected text to the clipboard
Ctrl-V Paste the clipboard contents at the cursor
Ctrl-X Cut selected text to clipboard
Backspace Delete selected text, or the character to the left of the cursor if no text is selected
Ctrl-Backspace Delete the word to the left of the cursor
Delete Delete selected text, or the character to the right of the cursor if no text is selected
Shift-Delete Performs a ``cut'', i.e., copies to the clipboard before deleting
Ctrl-Delete Delete the word to the right of the cursor
Insert Toggle insert/overwrite mode for typed characters
Shift-Insert Perform a ``paste'' from the clipboard
Home Move cursor to the start of the line
Ctrl-Home Move cursor to the top of the document
End Move cursor to the end of the line
Ctrl-End Move cursor to the end of the document
Page Up Scroll up one page
Ctrl-Page Up Move cursor to start of first visible line
Page Down Scroll down one page
Ctrl-Page Down Move cursor to end of last visible line

The arrow keys move the cursor, and with Ctrl pressed the left and right arrow keys move the cursor word-by-word. Holding the Shift key while moving the cursor with the mouse or with other keys will select the intervening text. The left mouse button is used to move the cursor by clicking, and to select text by dragging.


next up previous contents index
Next: The WR Button: Email Up: Introduction to Xic Previous: Button 4, Mouse Wheel   Contents   Index
Stephen R. Whiteley 2006-10-23