- BB: The future: Is there one?

From: [at]} <Alexander>
Date: Mon, 22 May 2006 00:38:18 +0700

Hello, Les!

LM> I don't mind that the keywords accepted by the compiler have to be
LM> uppercase. I just think an editor which accepted either/both
LM> case(s) and changed each keyword to uppercase immediately after
LM> <ret> was pressed would be a big improvement.

  This kind of fix would make plain (non-program) text editing rather
  annoying, including comments (**) where you don't want to BEGIN or

  END everything in capitals. If we would want to be able to
  switch this behaviour on and off, we would introduce a mode to the
  BlackBox (much like CapsLock mode). And this still would be
  inconvenient as we'd have to worry about its current state when
  switching between program and plain text editing.

  I ecnountered another approach in Plug-In Oberon (see EditKeys.mod
  and EditKeys.text). The point is this: when I press certain key
  (Insert, for instance) the text before current cursor position is
  treated as a macro command. The macro executes a command or simply
  replaces itself with some text and cursor is assigned a new position
  (usually inside inserted text).

  Macros are defined in a text file and may be easily edited.
  Macros may call other macros.

  Syntax of macro invocations:
    MacroInvocation = {Argument ":"} MacroName.
    Argument = { <arbitrary graphic character except : and " > } | TextStretch.
  Examples of macro definitions:

  Initials ("JM" write)

  M ("MODULE " write arg0 write "; (** " write Initials " " write
    stamp " **)" write cr
    caret cr "END " write arg0 write "." write cr)

  P ("PROCEDURE " write arg0 write ";" caret write cr
                indent "BEGIN" write cr
                indent "END " write arg0 write ";" write)

  So, for example, if you want to write a new procedure, you don't
  have to type everything by hand. You just type this:


  press "magic button" (Ins) and instantly get this:

  END NewProc;
  with proper intendation and caret instead of "|".

  Maybe something like that already exists in CPC, I don't know.
  If not, it shoudn't be very hard to port from Plug-In Oberon.


Received on Sun May 21 2006 - 19:38:18 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:59 UTC