If SeX has been installed properly, it can be from a Unix command line by using the command sex. This will start SeX with no files loaded. You can load files later by using the File menu. You can also load files directly from the command line, by giving their names after the name of the program:
sex letter.txt
The above command would load the file letter.txt into the editor. You can load as many files as you wish, from the command line, via the File menu, or in any combination. SeX does not limit the number of files that are loaded. SeX does not have any command line options.
The window has a menu bar at the top, a large text area in the middle, scroll bars below and to the right of the text area, and a status line at the bottom. The status line shows the current position in the text, and the total size of the text. When the file has been modified but not yet saved, the end of the status line will have two stars.
To insert new text, you just type. There is no special command you need to use. SeX is `eight bit clean', meaning that non-English letters will usually work, at least for West European languages.
If you have selected text (this is explained in the next two sections), typing something will replace the selection.
The greatest appeal of SeX is what it allows you to do with a mouse, its mouse language. If you've used X a lot, you are probably familiar with xterm. SeX defines the following mouse language:
The way SeX uses the middle mouse button is unique to SeX, and makes it really easy to delete and move text around, which is what most editing is.
The selection is shown with black background. There is no separate text cursor: the selection is the text cursor.
The selection may be columnar, i.e., a rectangle that selects only between the columns of the end points. The shape of the selection is controlled with the Toggle columnar entry in the Edit menu.
SeX defines some more things that can be done with the mouse, but they will be described later.
The empty selection can be moved around with the cursor keys, as usual. Some Emacs key bindings also work; see Command summary, Chapter 4. If the selection was not empty, it will be made empty, by selecting the empty string at either end of the selection.
Non-empty selections can be made by pressing Shift and a cursor key. This moves one end of the selection, and keeps the other end at the same place. For example, pressing Shift-Right twice, selects the next two characters. Pressing Control-Shift-Right selects the next two words.
When you have selected text, you can cut it, by clicking inside the text with the middle mouse button. This will remove the selected text from the file, and put it into a kill ring (sort of like a clipboard). If you then move to some other place, you can paste the text from the kill ring, again by clicking with the middle mouse button. This is a simple way to move text around in the text.
The kill ring is different from a traditional clipboard in that it can contain many pieces of text. After you have pasted the first piece of text in the ring, you can replace the pasted text with the next piece of text, by pressing the control key while you click the middle mouse button. And then you can replace that with the next piece. After the last piece of text, you get the first piece again (that's why it's a ring). You can do this any number of times. This is useful when you know you regret having deleted text some time ago, and would like to get it back.
Instead of cutting the selected text, you can paste it directly by just clicking with the middle mouse button outside the selection. Copying is as simple as moving.
You can also cut, copy, and paste with the keyboard. Delete cuts, Alt-W copies, Insert pastes the most recent text in the kill ring, and Control-Insert goes round in the kill ring. Further key bindings are shown in Command summary, Chapter 4.
The Edit menu allows you to do the editing without having to memorize anything. It is just somewhat slow.
The File menu allows you to operate on files:
The Search menu allows you to search, and optionally replace text in a file. The first entry in the menu pops up the search and replace dialog box. The other entries are alternative ways to select the command buttons in the dialog box.
The dialog box has two text fields, for the text to search for, and the text to
replace it with. There are also option buttons for backwards searching
(default is forwards), case insensitive matching (makes `a' match `A'), and
regular expressions (a powerful way to write complicated patterns; see
regex(7)
).
In the replacement text, you can use & to include the matched text. For example, if the search pattern matches foo in the text, and the replacement text is &bar, the text will be modified to be foobar. To get & itself, you need to type \& (and \\ to get a backslash; no other escapes work, however).
The command buttons are:
The dialog box will stay visible until you close it.
SeX allows as many windows as you wish. You can have any number of windows displaying the same file, or a different file in each window. Windows are created using the Window menu:
Note that every SeX window is a different top level window (which means, for example, that you can iconify them separately). SeX does not divide its top level windows into subwindows.
Simple editor for X: Users' Guide
Version 0.12liw@iki.fi