The x11 interface is used under X-Windows on UNIX systems. It provides a scrollbar and mouse support, and allows you to select which fonts to use.
X11 Options
To specify a normal font, use -font fontname or -fn fontname. Proportional fonts are not properly supported, but they aren't rejected with an error message either. If you don't specify a normal font, then Elvis will use a font named "fixed" by default. (This default can be overridden by a "set font=..." command in the elvis.ini file. The default elvis.ini file does this, making the new default font be 18-point Courier.)
To specify a bold font, use -fb fontname. The specified font should have the same size character cell as the normal font, but Elvis does not verify this. If you don't specify a bold font, then Elvis will fake it by smearing the normal font rightward one pixel.
To specify an italic font, use -fi fontname. The specified font should have the same size character cell as the normal font, but Elvis does not verify this. If you don't specify an italic font, then Elvis will fake it by sliding the top half of the normal font rightward one pixel.
If you want to use Courier fonts, there is a shortcut: -courier size will use the normal, bold, and italic versions of the Courier font in the requested size.
You can force Elvis to use only black and white with the -mono flag; this is the default if your display only has one bitplane. For color displays, -fg color and -bg color can be used to set the normal text color and the background color, respectively.
Elvis has a built-in icon, which is generally a good thing. Some window managers won't allow you to assign a new icon to a program that has a built-in one, so Elvis has a -noicon flag which disables the built-in icon.
The -fork client causes Elvis to run in the background, so that your shell prompt returns immediately.
The -client option causes Elvis to look for an already-running Elvis process on the same X server and, if there is one, send the new arguments to it. This causes the old Elvis process to create new windows for file arguments. The new Elvis process then exits, leaving the old one to do the real work and allowing your shell program to prompt for a new command immediately. For the sake of uniformity, if -client fails to find an existing Elvis process, then a new Elvis process starts up as though you had used the -fork argument instead.
The -client option is implemented in an interesting way: the client Elvis simply sends a series of ex commands to an existing window of the server Elvis. For each file name argument, the client Elvis sends a ":split file" command. For -ttag, the client Elvis sends a ":stag tag" command. For -ccommand, the client Elvis simply sends the command, and this results in some quirks. First, the server Elvis temporarily sets security=safer while the command is executed, for security reasons. Second, the command is executed by the server's existing window, not the new one, so (for example) "elvis -client -c 20 foo" creates a new window for the file "foo", and then moves the OLD WINDOW's cursor to line 20 of whatever file it was showing.
X11 Mouse
I've tried to reach a balance between the mouse behavior of xterm(1) and what makes sense for an editor. To do this right, Elvis has to distinguish between clicking and dragging.
Dragging the mouse always selects text. Dragging with button 1 pressed (usually the left button) selects characters, dragging with button 2 (the middle button) selects a rectangular area, and dragging with button 3 (usually the right button) selects whole lines. These operations correspond to Elvis' v, ^V, and V commands, respectively. When you release the button at the end of the drag, the selected text is immediately copied into an X11 cut buffer, so you can paste it into another application such as xterm. The text remains selected, so you can apply an operator command to it.
Clicking button 1 cancels any pending selection, and moves the cursor to the clicked-on character. Clicking button 3 moves the cursor without canceling the pending selection; you can use this to extend a pending selection.
Clicking button 2 "pastes" text from the X11 cut butter. If you're entering an ex command line, the text will be pasted into the command line as though you had typed it. If you're in visual command mode or input mode, the text will be pasted into your edit buffer. When pasting, it doesn't matter where you click in the window; Elvis always inserts the text at the position of the text cursor.
Double-clicking button 1 simulates a ^] keystroke, causing Elvis to perform tag lookup on the clicked-on word. If Elvis happens to be displaying an HTML document, then tag lookup pursues hypertext links so you can double-click on any underlined text to view the topic that describes that text. Double-clicking button 3 simulates a ^T keystroke, taking you back to where you did the last tag lookup.
If your mouse has a scroll wheel, then Elvis can be configured to use it. For instructions on doing this, start Elvis and give the command ":howto scrollwheel".