Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tpu extensions to eve

1 view
Skip to first unread message

John E. Davis

unread,
Jul 10, 1990, 1:44:03 PM7/10/90
to
Hi,

Has anyone wrote an extension to eve that allows for more than one key-map?
Currently the default version of eve supports only the gold key map. However
in addition to the gold key map I would like to add a ctrl-x keymap. I know
that I can always define the gold key to be ctrl-x but I want more than one
keymap. In addition I would like to add an esc-key key map but I am afraid this
will conflict with the way eve currently handles esc sequences on a vt100.

It seems that with the tpu language eve can be as powerful as emacs. (of
course to compete with emacs all the low level screen io must be re-written to
write to the screen in an efficient way.) For example emacs supports all sorts
of programming modes (e.g. Fortran mode). Has anyone tried to write special
modes for eve? All I have managed to do is write an auto-indent mode but this
is primitive compared to the special modes of emacs.

Just Wondering,

--
--John

bitnet: davis@ohstpy
internet: da...@pacific.mps.ohio-state.edu

Boyd,Bob

unread,
Jul 10, 1990, 3:34:41 PM7/10/90
to
In article <DAVIS.90J...@pacific.pacific.mps.ohio-state.edu>, da...@pacific.pacific.mps.ohio-state.edu ("John E. Davis") writes...

>Hi,
>
> Has anyone wrote an extension to eve that allows for more than one key-map?
>Currently the default version of eve supports only the gold key map. However
>in addition to the gold key map I would like to add a ctrl-x keymap. I know

John,

Some time ago, several people at my site worked together and Glenn Fleming
along with help from myself and others wrote the necessary extensions to
EVE+ to generate EVE++ to have a 4 level keypad with WHITE, YELLOW, RED,
and BLUE...with an additional GRAY keypad map for the BUFFER LIST buffer.

I believe that you can find the code on one of last year's VAX SIG tapes.

Bob
-----------------------------------------------------------------
Bob Boyd Voice: (919)549-3627
Harris Semiconductor Microelectronics Center

E-Mail Address: r...@rtpark.rtp.semi.harris.com

sy...@bsu-ucs.uucp

unread,
Jul 11, 1990, 8:46:43 AM7/11/90
to
In article <DAVIS.90J...@pacific.pacific.mps.ohio-state.edu>, da...@pacific.pacific.mps.ohio-state.edu ("John E. Davis") writes:
> Has anyone wrote an extension to eve that allows for more than one key-map?

Yes. Actually, this is relatively straightforward. I once started trying to
write a (very simple-minded) emacs-emulation set of key bindings (though based
on EVE, not raw TPU) and I am appending a sample of how you might go about
adding a ctrl-x map.

> Currently the default version of eve supports only the gold key map. However
> in addition to the gold key map I would like to add a ctrl-x keymap. I know
> that I can always define the gold key to be ctrl-x but I want more than one
> keymap. In addition I would like to add an esc-key key map but I am afraid this
> will conflict with the way eve currently handles esc sequences on a vt100.

Correct. You would need to use a different meta key, but it could be anything
that EVE will recognize. (I understand that beginning with VMS 5.3, VAX TPU
will even recognize the function keys F1-F6 that it currently does not.)



> It seems that with the tpu language eve can be as powerful as emacs. (of

Virtually. TPU is a pretty general language, after all.

> course to compete with emacs all the low level screen io must be re-written to
> write to the screen in an efficient way.) For example emacs supports all sorts
> of programming modes (e.g. Fortran mode).

Why is this an example of writing to the screen in an efficient way?

>Has anyone tried to write special
> modes for eve? All I have managed to do is write an auto-indent mode but this
> is primitive compared to the special modes of emacs.

The answer to this is also yes. For example, I have written, and use
regularly, special 'modes' for a number of programming languages. I have
auto-indent's for several languages for which it seemed useful, including a
semi-auto indent for DAL with its "dot indentation". (I borrowed the backslash
key for a "return with auto-dot-indent" for this one.) I also have parenthesis
matching for some of them (e.g., LISP and TPU). and for LISP, I have a
procedure bound to the ] key that closes all of the open parentheses in the
current function or macro. My procedures are not always fully general, but I
have used them quite happily. If anyone is interested, write to me. I have no
intention of posting them because they add up to quite a hefty amount of code
and they are not of sufficiently general interest. (Even if they were, I am
not all that sure that posting would be the best way of distributing them.)

A much more general set of "special modes" has also been written based on EVE.
It seems to be a little-known fact, and DEC does not seem to publicize it, but
DEC's Language-Sensitive Editor is based not on raw TPU, but on EVE. I wanted
to try to create set-up files for myself to make LSEdit behave like my (heavily
customized) version of EVE, not like the crippled version that comes directly
from DEC. (Mind you, now, I do not want to be too critical of DEC for
distributing EVE with virtually no useful key-bindings, since EVE is supposed
to be the EXTENSIBLE VAX Editor, for people to customize for themselves.)
Anyway, not knowing the names of any of the procedures within it so I could
call on them and not knowing what I would have to either cobble together myself
or import (steal?) from the EVE code, I decided to look at the LSEdit
executable. Guess what I found. I did not take a complete inventory, so could
be wrong, but it looked like all of the EVE_ and EVE$ procedures were there, so
you can use all of your customized TPU code designed for EVE with LSEdit too!

I would call that a good deal more than a set of "special modes" for EVE. The
only problem with LSEdit is that it is so SLOOOOOW starting up, but other than
that it is terrific. I ought to use it more, but my own mods are so much
faster that I am usually willing to forego the additional capabilities. If you
are an EMACS fan, though, you are probabably used to keeping an editor process
lying around so you don't need to keep restarting it and you might consider
basing your mods on LSEdit rather than directly on EVE.

The following is a sample TPU program that you could use as a starting point
for an EMACS emulation. I have more than this, but this is enough to give you
the idea of how to go about it.

!---------------- CX.TPU ------------------------------------

procedure init_cx_map
define_key ("eve_quit", ctrl_c_key, "quit", cx_map);
define_key ("eve_get_file ('')", key_name ('f'), "get_file", cx_map);
define_key ("eve_include_file ('')",key_name ('i'), "include_file", cx_map);
define_key ("eve_split_window (2)", key_name ('2'), "split_window", cx_map);
define_key ("eve_one_window", key_name ('1'), "one_window", cx_map);
define_key ("eve_write_file ('')", key_name (ascii(28)),
"write_file", cx_map); ! ctrl-\ save to same filename
define_key ("eve_spawn ('')", key_name ('!'), "spawn", cx_map);
endprocedure; !init_cx_map

procedure cx
message ("C-X ");
execute (lookup_key (read_key, program, cx_map));
message ("");
endprocedure;

cx_map := create_key_map ("cx_map");
init_cx_map;
define_key ('cx', ctrl_x_key, 'C-X prefix');

!---------------- end of CX.TPU ------------------------------------

----
Paul Neubauer sy...@bsu-ucs.uucp or SY...@BSUVAX1.BITNET

0 new messages