---
name: "sex"
section: "1"
platform: "linux"
package: "sex"
version: "0.19.1-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/sex"
---

# sex(1)

simple editor for X

## NAME

sex - simple editor for X

## SYNOPSIS

sex \[file ...\]

## DESCRIPTION

This manual page documents the Simple Editor for X (SeX). SeX is a text editor for the X11 environment.

When started, SeX opens a typical editor window. It has a big area for the text, a scrollbar to the right and at the bottom, some menus at the top, and a status line at the bottom. A black square is at the beginning of the text; it shows the *selection*. There is no cursor, the selection is used instead.

The selection can be changed using the mouse. The mouse language is similar to that of [**xterm**(1)](/xterm/1.md). Click with left mouse button to select an empty string, twice to select a word, thrice to select a line. Press left mouse button, move mouse, and release button to select the area between the locations of the press and release. The right mouse button extends the selection (moves the nearest end of the selection to mouse position). Click middle button outside selection to paste, inside to cut. (The cutting is new to SeX, not part of xterm.)

The rest of this manual page describes the use of SeX in further detail, but the above should be enough to get started.

### Key bindings

Key bindings mimic some other editors. Combinations of the control key and alphabetic characters follow Emacs. (But not all of Emacs' bindings are implemented.) Cursor keys work intuitively; they mimic popular MS-DOS and Windows applications.

### Menus

The menus should be very straightforward. Some notes may be of use, however.

In the File menu, "*Remove buffer*" makes the editor forget about a file. It doesn't remove the file. "*Mark unmodified*" make the editor think the file has not been modified since it was loaded or saved. "*Next file*" and "*Prev file*" select the next and previous file. SeX can handle any number of files at the same time.

In the Edit menu, "*Pipe*" will filter the selection through a Unix command, and replace the selection with the output of the command.

In the Buffers menu, dashes before a file name mean that the file has not been read from the  disk yet, and stars mean that it has been modified.

### Magic menu buttons

Some of the menu buttons operate differently if clicked on with the middle or right mouse buttons.

For the File menu, the middle button will load the file whose name is the current selection; the right button will save all modifed files.

For the Goto menu, the middle button will jump to the line number in the current selection (it will skip all text from the beginning of the selection).

For the Search menu, the middle button will search the next occurence of the current selection.

For the Window menu, the middle button will clone the window (open a new window that shows the same buffer at the same location).

## CONFIGURATION FILE

SeX reads the configuration file *~/.sexrc* if it exists. That file can define the following variables:

- *save\_backup*

  When saving a file, rename the old version of a file into "foo.bak"? Value should be "yes" or "no". (Default: "no".)

- *fmt\_program*

  Program to run when using the "format\_selection" command (bound to Meta-Q), or the Edit/Format selection menu entry. (Default: "fmt".)

- *max\_killring*

  Maximum amount of text to save in kill ring. Amount is in bytes. (Default: 64\*1024 = 64 kilobytes.)

## SEE ALSO

*\`\`Simple editor for X: Users' Guide'',* installed as */usr/doc/sex/sex-manual.html/index.html* on a Debian GNU/Linux system.

## BUGS

Since the mouse selections work so similar to [**xterm**(1)](/xterm/1.md), it is easy to mistakenly click with the middle mouse button in a terminal window when you want to delete the text. Mixing with SeX and an editor inside an xterm can produce interesting effects.

## AUTHOR

Lars Wirzenius \<liw@iki.fi\>.

SeX can be distributed according to the GNU General Public Licence. (See /usr/doc/copyright/GPL on a Debian GNU/Linux system.)
