The stedi editor




This editor was originally developed for the Atari-ST computer. In its first version it was written in Motorola 68000 assembler language (1986). In this version it became part of the commercial package CRAFT for the Atari-ST together with the GP-shell. In 1987,1988 it was ported to the C language and vastly extended. Later (1991) it was ported to the NeXTstep operating system and made to run on several UNIX based systems. Its current version runs under LINUX and X-windows. When used with the file stedi.xdf it has an interface that is rather similar to the original Atari interface which was considered to be very ergonomical.

The editor is rather complete with a control language, regular expressions in search and replace and many more original features that no other editor has. But most of all it has a very elegant implementation of the folding feature (folds were originally introduced in the occam compiler package for the transputer in the mid 1980's, but in a way that it couldn't be used for any other language). The editor is very fast and very compact. All sources in the FORM distribution that were made by J. Vermaseren were made with it and use the folding feature extensively. It keeps the files very well ordered.

The editor needs the termcap system for its interaction with the screen. The regular termcap file that comes with the LINUX system contains a serious omission for the xterm entry (the delete key isn't defined). Hence we provide a corrected file.

Because there are currently (7-jun-2009) two types of computers on the market we provide two types of executables: for 32-bits systems and for 64-bits systems. The 64-bits executables can handle very big files, depending of course on how much memeory is available.

How to install stedi


There are two ways to install stedi. You can rely on the C compiler in your system or you can pick up the executables. In the first case you need of course to have the C compiler installed and you will need the termcap library which the makefile expects to be in /usr/lib/termcap. If you just pick up the executables (either stedi32 for a 32-bits system or stedi64 for a 64 bits system) you can skip some of the next steps. You will need to get the sources anyway, because there are some other files that you will need.

The sources are in the file stedisrc.tgz which you should pick up and put in the location where you want the stedi directory (named stedidir) to be. Next you unpack the file with the command

   tar -xzf stedisrc.tgz

This will create the directory and its contents. Enter this directory. If you are using a 32-bits system, type

   make -f make32

which will produce the executable file stedi32, while if you have a 64-bits system you should type

   make -f make64

to produce the executable file stedi64.

For the next step you should make sure that you have a subdirectory in your home directory named bin. If you do not have such a directory you can type

   mkdir ~/bin

For the next steps we will assume that you have a 64-bits system. You type now the following commands

   cp stedi64 stedi.hlp stedi.xdf macs termcap ~/bin
   cp st64 ~/bin/stedi

If you didn't compile but just picked up the executable stedi64, make sure it ends up in the bin directory. One caveat: sometimes, when you pick up a file it does not get execution rights. This is repaired with the command

   chmod 755 ~/bin/stedi64

Next we have to make sure that the system can find everything. This is done with the path variable and some environment variables. I do this in the .cshrc file (I use tcsh. If somebody who knows how to do this with bash can mail me this, I will include it in these pages). I add the following lines to the file:

   setenv STEDIHLP ~/bin
   setenv STEDIDFT ~/bin
   setenv STEDIMAC ~/bin/macs
   setenv TERMCAP ~/bin/termcap
   set path = ( . ~/bin $path )

When you log in of start a new shell everything should be fine. Typing stedi name(s) will let you edit the named file(s).

If you would like to reprogram one or more keys of the keyboard you need to install the key compiler. This is done either by picking up the proper executable (keycomp32 or keycomp64), renaming it keycomp and putting it in the bin directory making sure that it is executable (chmod 755 keycomp), or by compiling it yourself. For this you go to the stedidir directory and type

   make -f makekey
   cp keycomp ~/bin

There is an example file named keyredef.k which are the redefinitions I use. The manual explains how to proceed.

The manual


The manual is available in three forms: a .pdf version, a postscript postscript version, and an online version.

Other versions


The above holds for nearly all UNIX-like systems. I am trying to get the editor to run on the more recent INTEL-like versions of the Apple notebooks. It is almost working but it has problems opening the X windows (cannot get the display right). Because I don't have such a computer progress is slow.