Newsgroups: 
	comp.editors
	comp.os.linux.announce
	comp.windows.x.announce
From: Lars Wirzenius <liw@iki.fi>
Subject: Simple editor for X, version 0.6
Followup-to: comp.editors

Someone once said to me that it is a certain sign of having too 
much free time and not enough ambition when you write yet another 
editor.  I admit the part about ambition.

A few of years ago I began using X a lot (a Linux box at home
does that to you).  I'd been using various text mode editors
for many years, and had settled down on vim, the vi clone.
It didn't support X, and I wanted something that did.

I looked at a couple of dozen different editors.  I wasn't too
happy with any of them.  There were many different reasons,
but the crucial one for every single one of them was the mouse
language.

The two most common things that I do when editing are deleting
and moving text -- cutting and pasting.  An X editor should
make it really comfortable to do these with the mouse -- and
with the mouse alone, since my other hand might be holding a
book or ice cream.

Every editor I tried made these simple operations complicated.
Selecting text was quite straightforward, and pasting was
also pretty simple, but the cutting was not.  For some reason,
you can't cut without using the keyboard or going via a menu.

After thinking about the issue, I decided that what I wanted was
something very similar to the way xterm works, but with one special
case: if you click the middle mouse button outside the selection,
you paste (this is the same as in xterm), but if you click 
_inside_ the selection, you cut.  I figured that this would make
for a comfortable mouse language.

Many editors are configurable, so I guess it would have been
possible to customize them to support "my" interface.  However,
I didn't want to spend a lot of time reading manuals and learning 
the editor inside and out.  I wanted something small and simple.  
And if I had to spend a lot of time learning something, I preferred 
to spend it on something that was useful for more than just editor
customization.

So I set out to learn X toolkit programming and write the
"Simple editor for X", or SeX for short.  Here's an overview
of what I've managed to produce:

	o  it's fairly small (about 120 kB, stripped, on my Linux i586
	   system)
	o  not too slow, unless the files are big
	o  seems to work, more or less, but has many rough edges
	o  the mouse language is as xterm's, but with the addition
	   that clicking with the middle button inside the selection
	   cuts it instead of pasting it
	o  can mostly be used from keyboard as well, key bindings 
	   follow Emacs and PC/Windows somewhat; keyboard customization
	   is done via the X resource file
	o  multiple files, multiple windows (no inherent limits on either)
	o  the command name will probably attract attention
	o  no macros (not sure if they will ever be implemented)
	o  supports font "fixed" only (this _will_ change, once I learn
	   how to figure out which font is wanted)
	o  no undo/redo yet (this will be implemented later)
	o  no hypertext help (might convert help file to html later,
	   but you'll need an external web browser)
	o  relies on my Publib library (so you'll have to install that too)
	o  not really a clone of any other editor
	o  doesn't handle columnar selections (yet)
	o  simple C support (indent if previous line ends in open brace)
	o  select text with keyboard
	o  feature set is mostly frozen, except for the planned
	   additions mentioned above (S for Simple)

SeX is meant as a personal tool.  I don't intend to take over the
editor market.  But I wouldn't mind having a few users, since they
will use it in different ways from me, and will find bugs.  They
might even fix the bugs, if I'm lucky. :)

If you want to try it out, start with the web page at
<http://www.iki.fi/liw/SeX/>.  However, be warned that
this is my first X program, and I have probably done many horrible
things.  Don't hesitate to tell me, if you notice anything.

If you don't get it to work, however, don't hesitate to ask me for
help.  I might not have time to answer, but go ahead and ask.
Read <http://www.iki.fi/liw/mail-to-lasu.html> first, though.

I've been using SeX for some months now, and I _really_ like the
mouse language.  The keyboard interface is fairly nice (but only 
contains such commands as I regularly need).  Since editors are
such personal things, you'll have to decide for yourself.

If you want a heavy duty editing tool, look somewhere else.  If you're
happy with your current editor, don't waste your time with mine.

Lars Wirzenius
liw@iki.fi
