Subject: Editors compendium & sam

From: [email-masked]
Date: Mon, 27 Mar 1995 11:12:53 -0500

I just read the editors compendium in comp.editors, which is a tabular
comparison of lots of editors, and saw a lot of holes in the sam
column.  I was going to write to the guy and fill them in, but figured
I'd post my views here first to make sure I'm not missing something.  I
list the items below that were blank in the compendium, with my opinion
on the correct answer.  I welcome any corrections. I also list a few
where I think the compendium is wrong.

I added descriptions where I thought they were needed for because the
title wasn't clear enough.  If anyone wants to see the whole compendium
I can send it to them or post it to the list.  It is of course also
available in comp.editors.

Beirne
----------------------------------------------------------------------

Enter ASCII codes by #:  Use command '<echo "\xxx"' to insert at present
	location.
Goto column number: It says you can do this, but I don't know how.  I know
	I can put the cursor anywhere I want with the mouse, but don't know
	how to go to the nth column on a line.
Goto begin next line: ?
Goto begin prev line: ?
Move cursor up by page: yes, using the mouse on the scrollbar.
Move cursor dn by page: yes, using the mouse on the scrollbar.
Move to next word: yes, with the mouse.  You could write a command for this,
	but it wouldn't be worth using.
Move to prev word: yes, with the mouse.  You could write a command for this,
	but it wouldn't be worth using.
Move by sentence: yes, with the mouse or a command.
Move by paragraph: yes, with the mouse or a command.
Scrolling extend adjustable: This is defined as "Can the user specify the
	number of lines that are scrolled with PgUp/PgDn.".  I'd say the answer
	is no.
Single line scrolling:  Defined as:

"Some editors have an screen update optimization feature that instead
of redrawing the entire screen when srolling/panning left/right, only
the current line is scrolled leaving the remainder of the screen to
be updated during a period of inactivity."

I'd say no, because you don't scroll sideways.

Scroll curr line to TOS/MOS/BOS: Yes/No/No.

Change fname  w/o save: Yes, using "f newname".

Prog lang senstive mode: This says yes, but I don't know of any direct features
	for this.
	
Tag search: Yes, with the help of an external program.
Interactive debugging: No.
Syntax highlighting: No.

Binary editor: They give three categories.  I think this one is closest:
	"displays binary characters doesn't do CR/LF conversion on binary files"
Invertcase curr word: A macro could be written to do this.
Uppercase curr word: A macro could be written to do this.
Lowercase curr word: A macro could be written to do this.
Delete to line num.: Yes, using ".,nd" or "n,.d"
Indent selected region: Yes, using a macro.
Srch select region: No.
Srch multiple buffers: Yes.
List all occurances: Yes.
Menus customizable: You can't customize the built-in menus, but you can add
	menus externally with 9menu, or any other generic menu program.
Read only mode: No.
Simple/Novice mode: No.
Box and line drawing: No.
Line numbering: No.
Internationalization: No.
Printing: This means "Many editors allow you to print selected text directly
	to a printer".  Yes, with a macro.
Keymaps saved in files: Yes, with the samx extension.
Templates: No.
GUI: Yes, but they don't define this.
Window to full screen: Yes.
Fit all wins. on screen: No.  This involves automatic tiling or cascading.
Uses term. scroll opt.: No.  This is for text mode.
Uses term. ins/del opt: No.  This is for text mode.
Font selectable: Yes, by setting resource.
Can quote ctrl chars: Not relevant, since control characters aren't used for
	commands.
Can quote ^s/^q: Not relevant.
Select region filtering: Yes.
Undo last command: Yes.
Undo line changes: No.
Undo historically: Yes.
UNIX (text terminal): Yes, in ed-like fashion.
X windows versions: Yes.
All other OS's: No.

-- 
-------------------------------------------------------------------------------
Beirne Konarski                 | Reading maketh a full man, conference a
[email-masked]            | ready man, and writing an exact man.
"Untouched by Scandal"          |       -- Francis Bacon
-------------------------------------------------------------------------------

---

From: [email-masked]
Date: Mon, 27 Mar 1995 11:45:07 -0500

it seems that sam doesn't fit their model very well, which doesn't surprise me.
one thing they can't encompass is that the mouse language and command
language solve different sets of problems.

general comments: there is no such thing (in sam as i wrote it, at least) as a
sam macro, so i'm not sure what you mean by the word 'macro'.

details:

	Goto column number: It says you can do this, but I don't know how.  I know
		I can put the cursor anywhere I want with the mouse, but don't know
		how to go to the nth column on a line.
sam has no notion of column, only characters.
	Goto begin next line: ?
+
	Goto begin prev line: ?
-

no
	
	Tag search: Yes, with the help of an external program.
if the program's not there, does that count?

	Interactive debugging: No.
with acid, the external B command does a nice job.

	Syntax highlighting: No.
it's really 'no', but i don't miss it in C because of the double-clicking rules

	Binary editor: They give three categories.  I think this one is closest:
		"displays binary characters doesn't do CR/LF conversion on binary files"
sam throws away nuls; it can't be used on binary files.

command, not macro.

command

	Srch select region: No.
x/pattern/p

	List all occurances: Yes.
occurrences.  tell me this is your typo.

	Internationalization: No.
although it works with any character set and is supported with Unicode.

command

---

From: Erik Quanstrom <[email-masked]>
Date: Mon, 27 Mar 1995 12:01:14 -0500

>Enter ASCII codes by #:  Use command '<echo "\xxx"' to insert at present

also <compose> 0Xnnnn will insert any the utf-8 character of number
nnnn at the current location.

this is a superset of ascii, so the answer is yes.

>	how to go to the nth column on a line.
-/^/+#10

go to 10th column

>Goto begin next line: ?
+,/^/ (0th postion on next line)

but for god sakes, use the mouse.

>Goto begin prev line: ?
-
-,/^/

>Move cursor up by page: yes, using the mouse on the scrollbar.
using up on keyboard, too
>Move cursor dn by page: yes, using the mouse on the scrollbar.
using down on keyboard, too

>Scroll curr line to TOS/MOS/BOS: Yes/No/No.
use the mouse

>	"displays binary characters doesn't do CR/LF conversion on binary files"
elides \0.

---

From: [email-masked]
Date: Mon, 27 Mar 1995 15:40:47 -0500

Thanks for the replies so far on the editor compendium.  I'll respond to both
Erik & Rob here.  A few of the suggestions don't work in all situations, so 
we'll have to decide how to state them.

Beirne

From: Erik Quanstrom <uunet!sartre.minerva.bah.com!quanstro>

>>	how to go to the nth column on a line.

Good, but it won't work on the first line, if this matters.

>+,/^/ (0th postion on next line)

This doesn't work if you are at the beginning of a line.  How about just /^/

>but for god sakes, use the mouse.

Agreed.

>>Goto begin prev line: ?

This selects the previous and current lines.

>using down on keyboard, too

Of course!

>>Scroll curr line to TOS/MOS/BOS: Yes/No/No.

You can use the mouse to move the current line to the top of the screen, but
there is not a simple way to move the current line to the middle or bottom,
short of a bunch of trial-and-error clicks, unless there is something I am
missing.
>>	"displays binary characters doesn't do CR/LF conversion on binary files"

Good.  I'll have to remember this.

From: uunet!plan9.att.com!rob

>language solve different sets of problems.
I agree, since sam has almost no features and almost infinite capabilities.

>sam macro, so i'm not sure what you mean by the word 'macro'.

I looked at the compendium again, and found a better choice than to say macros,
which is to use the following, so I will substitute this wherever I said macro.

     ^     The editor does not have a specific command to do this, but
           it can be very easily done with a couple of keystrokes.
           I.e.  Clear buffer may be implemented as:
                     select buffer contents command,
                     delete selection.

The compendium does have one item as being implemented with a macro, which is
"Spell check select text".  I did this with an external script that I wrote
that is a front end to ispell, but this should go in the filter category in
the compendium rather than as a macro.

>sam has no notion of column, only characters.

This highlights the next line.

>	Goto begin prev line: ?

This highlights the previous line.

>if the program's not there, does that count?

Good question.  I just looked, and I got the tag program with the samx
extensions, which I am not counting here, although I couldn't live without
them.

>with acid, the external B command does a nice job.

Is acid available for UNIX?  This does make me realize that I should add Plan 9
to the OS list.

>it's really 'no', but i don't miss it in C because of the double-clicking rules

Agreed.  Also, I've found regular expressions to convey the C constructs I care
about.

>x/pattern/p

This one could be a yes.  It depends on what they mean.  This command selects
the last occurrence in the selected region, which may be fine.

>occurrences.  tell me this is your typo.

Its not my typo. I cut & pasted it from the compendium.

>Goto begin next line: ?
+0+#0

Good, but it won't work if you are at the beginning of a line.

>Goto begin prev line: ?
-0-#0

Good, but it won't work if you are at the beginning of a line.

---

From: [email-masked]
Date: Mon, 27 Mar 1995 16:02:32 -0500

wait for them to characterize acme this way.

---

From: [email-masked] (Steve_Kilbane)
Date: Tue, 28 Mar 1995 02:50:23 -0500

For going to the beginning of previous line, I find
--#0
works better. however, it seems better to say "yes,
but using the mouse is easier", because it saves
misrepresenting sam...

steve