SUE - Simple Unix Editor

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

SUE - Simple Unix Editor

#1 Post by DMcCunney »

In 1982, a chap named Richard Forbes published an article in Byte Magazine about VDO, a Video Display Oriented editor for early micros running the CP/M OS. It was intended to demonstrate the capabilities of writing in MMV Assembler. Editors at the time tended to be line oriented, like MS-DOS Edlin or Unix ed, and VDO implemented a full screen editor. It was tiny, assembling to a 4K executable, and implemented a limited set of editing commands, but it was a place to start.

A developer named Eric Meyer picked up the source code to a variant of VDO called VDO-EX, aimed at the Osborne machine Eric used, and began writing an enhanced editor called VDE (Video Display Editor). VDE was modeled after the then popular WordStar word processor for CP/M systems, and used the WordStar command set. But it was faster than WordStar, because it did everything in one file instead of using overlays, and it implemented things like macros which WordStar didn't get until later.

In 1987, Eric shifted development to MS-DOS (and still maintains the DOS version - a 1.96a release appeared in November 2009.) He turned his assembler source over to Carson Wilson, who continued to develop and enhance it as ZDE.

Around 1992, Bill Kuykendall of PPCI hired Carson to create a Unix version of VDE, which was originally called UDE (Unix Display Editor), and then renamed SUE (Simple Unix Editor). Bill selected the features and managed the development process. Carson wrote the code from scratch in C. It was intended to resemble VDE, but not be an exact clone. For example, VDE's printer support features were omitted because Unix had an entire printer sub-system.

SUE uses WordStar commands by default, but has an optional function key driven interface. It's a console mode application, run in a terminal from a command line. By default, it uses color in menus, but can be forced to mono mode.

From the Man Page:
Specifically, SUE provides the following functionality:

o Terminal-independent, optimized full screen text editing;

o Dual command modes (control-key and function-key);

o Context sensitive, interactive help display;

o Novice and expert modes;

o Secure mode (restricts access to file system);

o Wordwrap, right margin set, and paragraph reformat;

o Transparent access to Unix, MSDOS, and (quasi-)Macintosh file formats;

o Undelete (yeah!);

o Insert/overstrike toggle;

o Block move, copy, delete, and write to file;

o File import.
It's intended to be a relatively powerful text editor while remaining small and easy to use. If you need fancy control of the printed page, look at something like AbiWord or Open Office Writer. If you need syntax highlighting for a variety of languages and development support, look at Geany, Emacs or the like.

I've been a long time user of VDE under DOS, and was pleased to find a Unix editor that resembled it.

I've provided two archives. Sue.tar.gz contains a static Linux binary called sue, a man page, and a README.SUE file with a bit of background on the product. Sue07i.tar.gz is the C source code, reported to compile "out of the box" on Solaris. (I have not tried to build it on Puppy. The supplied bainary works fine.)

No installation is required. Drop sue a directory in the PATH like /usr/bin. Run it from a command line as "sue [filename]" (You may need to chmod +x to make it executable.)

(If desired, you could write a wrapper script like

Code: Select all

rxvt -geometry 80x50 -bg black -fg white -title -e sue
to run sue in an 80x50 rxvt window with white type on a black background and sue as the window title, and attach that to a desktop icon.)

The executable is 320KB, and invokes almost instantly on my old Lifebook.
______
Dennis
Attachments
sue.tar.gz
Simple Unix Editor static Linux executable, man page, and readme file
(127.58 KiB) Downloaded 784 times
sue07i.tar.gz
Simple Unix Editor 07i C source archive
(30.02 KiB) Downloaded 767 times

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

Dynamically-linked SUE

#2 Post by 6502coder »

Musher0's enthusiasm for Joe's Own Editor as a writer's text editor rekindled my own interest in the old DOS text editor VDE, and its Linux derivative SUE.

As SUE is a mini version of WordStar, some people might find SUE to be a nice, lighter alternative to JOE.

The current home of SUE and its DOS ancestor VDE is here:

https://sites.google.com/site/vdeeditor/Home

Nothing seems to have changed since DMcCunney's post above, although I am not certain of that. At any rate, from the Files Section I downloaded "sue.zip" which contains the man page, README, and the statically-linked executable, which ran just fine on Puppy 4.1.2 Retro as well as SailorE's current Slacko5.8.3 CE. However, as DMcCunney noted, this executable weighs in at over 300K.

So I downloaded the source tarball "sue07i.tgz" and compiled a dynamically-linked version on Puppy 4.1.2 with the command

make linux

After stripping, this executable weighs in at only 47K. It works fine on Puppy 4.1.2 Retro, Slacko5.8.3CE, and radky's DPupStretch 7.5 RC4, so it should work pretty much anywhere.

A couple of notes:

On DPupStretch, SUE works in both LXTerminal and urxvt. But it does require at least 80 columns, and on my setup I found that I needed to run urxvt with at least 82 columns.

On Slacko5.8.3 CE, the backspace key performs a delete of the CURRENT character, not the previous character. (The statically-compiled executable also behaves this way.)

Edit: deleted mistaken reference to this problem also occurring with Puppy 4.1.2 Retro. It doesn't.
Edit2: This problem doesn't occur with SailorE's Slacko5.7.1 CE either, so it is probably an isolated issue due to some peculiarity of Slacko 5.8.3 CE.

For those who might be interested, I've attached my dynamically-linked executable. As I noted, you can get the official statically-linked version along with the documentation and source from the sites.google.com link above. These are probably identical to what DMcCunney provided in his links.
Attachments
sue.gz
This is a dynamically-linked executable. Remove fake ".gz" extension and place it anywhere in your PATH
(45.98 KiB) Downloaded 790 times

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#3 Post by Puppyt »

Thank you for this, 6502coder :)
I won't be able to test it out for a while - racing other deadlines - but since your recent post on the JOE thread I've hunted around for WordStar -like editors following your links to real/published writers' perspectives. Thought that maybe there might even be a emulation module in Latex etc (like the jstar feature in JOE) to evoke ol'-timey functionality for writing in streams of consciousness (whatevs). Wouldn't have to emulate the glorious Hercules Amber screens, but something like REVEAL CODES would be a major winner, in my regard. No success for me in that regard, so something like SUE will do in the interim, cheers!
(Now if only could find a WordStar keyboard template for a IBM/Lenovo laptop, like we had for ye olde Kaypro 10...)
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#4 Post by scsijon »

I installed it to /usr/bin, changed permissions to 744 and now get a error message, even though I can see it.

bash: /usr/bin/sue: no such file or directory

I suspect it wants a config file or directory somewhere and it won't create it, any ideas?

btw, back when puppy was in infancy there was a linux wordstar around, unfortunately it was pulled on a threat of legal matters.

I admit I do miss Q, another one-file wordstar clone from the cpm/mpm days, i've got source in my disc archives, but no longer a working hard-sector 5 1/4 floppy drive to even see if it can be read.

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#5 Post by foxpup »

I have to open sue in terminal

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#6 Post by rufwoof »

Under fatdog, wouldn't compile due to wide use of a 'restrict' variable being a restricted command. Changed those all to restrict_ and looks to work OK when using either TERM=screen sue or TERM=linux sue to run it.

Attached is a actual gzip (69K after gzip -d sue.gz)
Attachments
sue.gz
(29.42 KiB) Downloaded 458 times
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

Re: Dynamically-linked SUE

#7 Post by rufwoof »

6502coder wrote:On Slacko5.8.3 CE, the backspace key performs a delete of the CURRENT character, not the previous character. (The statically-compiled executable also behaves this way.)
Could that be the stty settings?

i.e. in terminal type 'stty erase ' and then press ctrl v and then press your backspace key. Then start sue and see if that made a difference
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#8 Post by rufwoof »

... still prefer mcedit though (part of Midnight Commander (mc) file manager ncurses program). As for one that is easier to work with multiple files open/edited at the same time.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#9 Post by 6502coder »

I guess a bit of clarification wouldn't hurt, especially for those not old enough to remember WordStar or to have used a WordStar-like app.

SUE is strictly a command-line app. There's no GUI. So yes, you have to open a terminal to use it.

SUE is NOT a general-purpose text editor, like say vi/vim or nano. It's certainly not a programming editor. Rather, SUE is what used to be called a "word-processing" program back in the days when a "printer" meant a device like a daisy-wheel or a dot-matrix. So forget about multiple fonts, colors, graphics, tables, etc. We're talking about just text, in a single font.

SUE is mainly intended to be used for the creation of prose text documents, as opposed to say shell scripts. So in this context, a "document" means words arranged in paragraphs. Moreover, SUE gives you (or one might say, forces you to accept) complete control over EXACTLY where line breaks occur in the printed document.

As you know, in a text editor like Leafpad, text is wrapped onto a new line as needed (assuming you have word-wrap enabled), and the line lengths change on-the-fly if you resize the window or edit the text. Also, the location of line breaks in the text on the screen is generally NOT reproduced in the printed result, owing to the differences between the Leafpad window size and font, vs the print device's page size and font.

In contrast, when SUE wraps text because there is too much text to fit on a line, those line breaks are REAL, not just visual. Each screen line of a paragraph ends in an actual newline character. If you go into the middle of a paragraph and delete or enter text, the lines of the paragraph do NOT get adjusted automatically to accommodate the changes. Instead, if you want to reformat a paragraph (the term "reflow" is usually used), you have to type a command to do this on demand.

The reason for this behavior is that SUE always shows you the text with line breaks exactly where they will be in the printed document. Back when print devices were monospaced, this made perfect sense, being the nearest thing to WYSIWYG at the time. These days, however, the Leafpad-style discrepancy between where lines are broken on the screen and where lines are broken on the printed page is neither unexpected nor objectionable (usually).

To sum up, most people who are looking for a WordStar-like editor these days are probably attracted by the ability to use the keyboard for most editing operations, instead of having to take one's hand(s) off the keyboard to use the mouse or Fn-keys. (Cf musher0's thread on Joe's Own Editor.) However, the other significant aspect of WordStar-era wordprocessing programs is this emphasis on WYISWYG line breaks. If the Leafpad-type behavior is what you want, then you DON'T want SUE.

Post Reply