textedit is a window-based XV iew application that provides both mouse and pointer operations and keyboard accelerators for the editing of text. In general, text editing throughout the OpenWindows user environment uses textedit conventions, both in text display areas such as mail message windows and command panel text fields.
textedit operates via a set of command panel buttons and text fields and a set of menus and submenus accessible from the main editing window.
If textedit hangs, for whatever reason, you can send a SIGHUPas0 signal to its process ID, which forces it to write any changes (if possible):
The edits are written to the file textedit.pid in its working directory. If that fails, textedit successively tries to write to a file by that name in /var/tmp, and then /tmp. In addition, whenever textedit catches a fatal signal, such as SIGILL , it tries to write out the edits before aborting.
You can specify a number of defaults using the .Xdefaults file that affect the behavior of the text-based facilities. See xview(1) for more detailed information.
Selections in textedit are defined as selected portions of text to which editing operations can be applied. For example, a selection can be deleted, moved, copied, etc.
textedit provides two types of selections: primary and secondary. Primary selections allow you to select a set of text on which to perform an editing function. Secondary selections allow you to define a second block of text without undefining your primary text selection or repositioning your cursor. Being able to define two sets of text at once allows you to take advantage of the advanced editing functions described below in the section called Function Keys.
Single characters can be selected using the SELECT.Blocks of text can be selected by selecting a starting point with the SELECT and selecting an ending point with ADJUST.
Or blocks of text can be selected using OPEN LOOK's wipe through feature by pointing at a beginning character and depressing the select button while moving the pointer to the end of a block of text.
Selections can also be made by sing clicking (rapidly pressing) the select button. Click once to select a single letter; click twice to select a word; click three times to select a complete line of text; click four times to select the entire document being edited.
All primary selections are indicated visually by inverse video of the text selected and are pending delete. Pending delete selections are replaced if you type or paste while the text is selected.Secondary selections that are not pending delete are indicated by underlining of the text.
Secondary selections pending delete are indicated by underlining of the text and strike through of the individual characters.
Secondary selections are made using any of the selection methods described above in addition to holding down one of the four function keys corresponding to the commands Cut, Find, Paste, or Copy.Secondary selections are made pending delete by holding the CTRL key when making the secondary selection. If a secondary selection is pending-delete, it is deleted when the function key is released, except in the case of the Find, which deselects the secondary selection.
You can make adjusted selections switch to pending-delete using the adjust_is_pending_delete defaults entry, or the -Ea option. In this case, CTRL -Middle makes the selection not pending-delete.
Commands that operate on the primary selection do so even if the primary selection is not in the window that issued the command.
For the most part, typing any of the standard keys either inserts the corresponding character at the insertion point, or erases characters. However, certain key combinations are treated as commands. Some of the most useful are:
Command Character Description Cut-Primary META-X Erases, and moves to the Clipboard, the primary selection. Find-Primary META-F Searches the text for the pattern specified by the primary selection or by the Clipboard, if there is no primary selection. Copy-to-Clipboard META-C Copies the primary selection to the Clipboard. Paste-Clipboard META-V Inserts the Clipboard contents at the insertion point. Copy-then-Paste META-P Copies the primary selection to the insertion point (through the Clipboard). Go-to-EOF CTRL-RETURN Moves the insertion point to the end of the text, positioning the text so that the insertion point is visible.
The commands indicated by use of the function keys are:
Command Sun-2|3 Key Description Stop L1 Aborts the current command. Again L2 Repeats the previous editing sequence since a primary selection was made. Undo L4 Undoes a prior editing sequence. Front L5 Makes the window completely visible (or hides it, if it is already exposed). Copy L6 Copies the primary selection, either to the Clipboard or at the closest end of the secondary selection. Open L7 Makes the window iconic (or normal, if it is already iconic). Paste L8 Copies either the secondary selection or the Clipboard at the insertion point. Find L9 Searches for the pattern specified by, in order, the secondary selection, the primary selection, or the Clipboard. Cut L10 Erases, and moves to the Clipboard, either the primary or the secondary selection. Help F1 Produces help text.
Find usually searches the text forwards, towards the end. Holding down the SHIFT key while invoking Find searches backward through the text, towards the beginning. If the pattern is not found before the search encounters either extreme, it lqwraps aroundrq and continues from the other extreme. Find starts the search at the appropriate end of the primary selection, if the primary selection is in the subwindow that the search is made in; otherwise it starts at the insertion point, unless the subwindow cannot be edited, in which case it starts at the beginning of the text.
CTRL -Find invokes the Find and Replace pop-up frame.
1) Change the value of the .Xdefaults parameter text.extrasMenuFilename to the correct file path.
2) Set the environment variable EXTRASMENU to the file desired.
Note that option 1 overrides option 2 if both are used.
For more information see the DeskSet Environment Reference Guide. See also xview(1) .
Only those items that are active appear as normal text in the menu; inactive items (which are inappropriate at the time) are lqgrayed outrq.
The file /usr/lib/text_extras_menu specifies filter programs that are included in the text subwindow Extras pull-right menu item. The file ~/.textswrc specifies filter programs that are assigned to (available) function keys. These filters are applied to the contents of the primary selection. Their output is entered at the caret.
The file /usr/lib/textswrc is a sample containing a set of useful filters. It is not read automatically.
Introduction to the OpenWindows User Environment
textedit produces the following exit status codes:
- normal termination
- standard OpenWindows help message was printed
- help message was requested and printed
- abnormal termination in response to a signal, usually due to an internal error
- abnormal termination during initialization, usually due to a missing file or running out of swap space
Handling of long lines is incorrect in certain scrolling situations.
There is no way to replay any editing sequence except the most recent.