;
;
; +----------------------------------------------------------+
; |                                                          |
; |    Sample Key Translations and Macro Definitions         |
; |                                                          |
; +----------------------------------------------------------+
;
INIT "Reading setup file ..."   ;send message to terminal
;
; START specifies a macro command that is executed
;       after the editor is loaded.  This one is
;       commented out.  If you delete the ; in front
;       of START, then the editor will start out with
;       insert mode (IM) and insert return (IR) both
;       turned off.
;
;START "=IM=IR"
;
;
; SETVAR defines values for variables number 0 and 1.
;        These two variables are used in the macros
;        for drawing a BOX defined later.  Values
;        are defined in case you type ^PB before
;        executing the BOX macro which also defines
;        values for both these variables.
;
SETVAR 0 "18"
SETVAR 1 "8"
;
;
;       Mapping Commands to Keys
;------------------------------------------------------
;
;     TRANSKEY maps a key sequence to a single editor command.
;
TRANSKEY "^[" "=CM"                  ;Command Mode (^[ is ESC key)
;
TRANSKEY "^P^S" "=SL"                ;Scroll Left
TRANSKEY "^PS" "=SL"
TRANSKEY "^Ps" "=SL"
;
TRANSKEY  "^P^D" "=SR"               ;Scroll Right
TRANSKEY  "^PD" "=SR"
TRANSKEY  "^Pd" "=SR"
;
;
;       Defining Macro Commands
;------------------------------------------------------
;
;     MACKEY  maps a key sequence to a macro command.
;     MACNAME defines a name for a macro command.
;
MACKEY "^PR"  "=GO1=NL"              ;Go to top of file
MACKEY "^P^R" "^PR"
MACKEY "^Pr"  "^PR"
;
MACKEY "^PC" "=GO-1=NL"              ;Go to bottom of file
MACKEY "^P^C" "^PC"
MACKEY "^Pc"  "^PC"
;
MACKEY "^PH"  "=SS12=NL=NL"          ;Split screen horizontally
MACKEY "^P^H" "^PH"
MACKEY "^Ph"  "^PH"
;
MACKEY "^PV"  "=SS=NL40=NL"          ;Split screen vertically
MACKEY "^P^V" "^PV"
MACKEY "^Pv"  "^PV"
;
MACKEY "^PP"  "=WT=NL=AP=NL"         ;Page file into the buffer
MACKEY "^P^P" "^PP"
MACKEY "^Pp"  "^PP"
;
;
; Macro for drawing a box (prompts for width and height)
;
MACNAME "HL" "+=RP=0=NL-+"           ;draws a horizontal line
MACKEY "#80" "|=LD=CL"
MACNAME "VL" "=LD=RP=1=NL#80"        ;draws a vertical line
MACKEY "^PB" "=CMHL=NL=WL=CMVL=NL=CMHL=NL=RP=1=NL=LU=LU=CL=CMVL=NL"
MACKEY "^P^B" "^PB"                  ;draws the box without prompting
MACKEY "^Pb"  "^PB"
MACNAME "BOX" "=GV0=NL'Width:'=NL=GV1=NL'Height:'=NL^PB"
;
;
; Macro for generating line numbers (for BASIC programming)
;
MACNAME "PROMPT" "=GV2=NL'Starting Number:'=NL=GV3=NL'Increment:'=NL"
MACNAME "AUTO" "=CMPROMPT=NL=AL=3=NL=LB=2 "
;
EXIT "Goodbye - Have a nice day ..."  ;send message to terminal
NL#80"        ;draws a vertical line
MAC