Date: Fri, 22 Apr 2005 23:31:22 -0400
To: WSFA members <WSFAlist at WSFA.org>
From: "Mike B." <omni at omniphile.com>
Subject: [WSFA] Re: Quoting
Reply-To: WSFA members <WSFAlist at WSFA.org>
At 08:40 PM 4/22/05 -0400, Keith F. Lynch wrote:
>"Mike B." <omni at omniphile.com> wrote:
>
>> If anyone knows of a non-emacs editor that's as powerful as TPU and
>> ... I can't get along with emacs (memory isn't good enough to keep
>> track of all the key combinations required).
>
>You can use a small TPU-like subset of the commands.
TPU has plenty of commands...not the least of which is the "learn" command,
where you can teach it new ones on the fly by example. It also has a very
powerful programming language built into it, with things like buffers as
basic data types and lots of functions for playing with them.
I tend to use the EDT keypad mode a lot, since I used to use EDT before TPU
came along and my fingers know where the keys are for things like delete
line, delete word, reformat paragraph, start select, go to beginning of new
line, etc.. I'm sure that part of TPU could be done in emacs easily
enough, but I already have that on Windows in an editor called Zeus...I
want the rest of TPU too!
If you want an idea what TPU macros look like, here's the macro I wrote to
move to a particular line number in a buffer (useful when coding):
!
! go to a particular line number
!
PROCEDURE goto
LOCAL line_num, num_lines, curr_line, prompt;
curr_line := GET_INFO(current_buffer, "record_number");
num_lines := GET_INFO(current_buffer, "record_count");
prompt := "Currently at " + STR (curr_line) + " o0f " + STR (num_lines) +
", go to what line: ";
line_num := read_line(prompt, 80);
IF( line_num = "" ) THEN
POSITION(curr_line);
ELSE
line_num := INT(line_num);
IF( line_num < num_lines ) THEN
POSITION(line_num);
ELSE
POSITION(end_of(current_buffer));
ENDIF;
ENDIF;
ENDPROCEDURE;
It's not the most interesting macro, but it is short compared to some
others I have for doing things like bubble sorts, sending e-mail, etc.. If
you want to see more, ask me off-list.
-- Mike B.
--
What's worth doing is worth doing for money.