My Zap setup

Version1
Released1 Mar 2003
RequiresZap 1.44, or later
Download38kB Zip archive

Zap is my (text) editor of choice. It employs the concept of modes that are tailored to different editing tasks. Thus there are separate modes for editing each of C, assembler, BASIC, HTML, etc source files. Modes are implemented as extension modules, so the list can be added to. There are over 3 dozen in total. Most of them support syntax colouring which particularly aids reading source code.

Zap is a highly configurable program, with many of the settings being on a per-mode basis.

Additionally, there are three main aspects that can be totally user defined :

Zap provides a large number of commands (many of which are defined by extension modes) that are used in the keymaps, menu definitions and button scripts.

Making anything other than minor changes to these can be a very time consuming process.

Zap 1.44 introduced a change in menu layout compared to 1.40, a change that I personally find welcome. The layout seems much improved in my opinion. Consequently I've left them as they are.

I have however made considerable changes to my default keymap.

There's also an alternative set of sprites and templates for the !HoTMeaL mode's button bar.

These mods are suitable for use with Zap 1.44 or 1.45. Minor changes may be required if using other versions of Zap. The archive available for download includes the following :

!_Install_H Run this Obey file to install my HoTMeaL mod
!_Install_K Run this Obey file to install my Keys file into !ZapUser

In sub-directory Keys :

!ZapUser Just containing my keymap file, a replacement for your local copy in !ZapUser.Config.Keys.UK
ZapRefL145 Crib sheet showing key assignments (ImpDoc)
Zap_145-Le Function key strip (Drawfile)

These last two are intended to be printed to paper.

Summary of my Default keymap

In the following list : s=Shift, c=Control, sc=Shift+Control, k=Key on keypad.

Common editing keys

cSpace               Remove unnecessary space around the cursor
scSpace              Insert " "

Escape               Stop current operation (except Learn)
sEscape              Cancel current interactive search or yank operation
cEscape              Open minibuffer for Zap command

Backspace            Delete character to the left of the cursor
sBackspace           Delete from cursor to the start of the line
cBackspace           Delete the current line
scBackspace          Strip trailing Spaces and Tabs

Delete               Delete character to the left of the cursor
sDelete              Delete from cursor to the start of the line
cDelete              Delete the current line
scDelete             Delete entire document

Copy   (End)         Delete character at cursor (delete right)
sCopy  (sEnd)        Delete from cursor to the end of the line
cCopy  (cEnd)        Copy mode
scCopy (scEnd)       Copy character from line above the cursor

Return               Performs return action for current mode
sReturn              Toggle auto indent on/off
cReturn              As Return, but doesn't auto-indent
scReturn             Insert "<p>"

Tab                  Tab
sTab                 Toggle tab mode (Unix/Edit)
cTab                 Tabify
scTab                Untabify

Insert               Insert a blank (space in textual modes, NULL in binary)
sInsert              Toggle insert/overwrite mode
cInsert              Copy selection to next icon clicked on
scInsert             Paste the clipboard to the cursor

Home                 Compact (minimise) Zap memory
sHome                Select the ANSI C identifier under the cursor

Cursor keys

Left                 Move cursor left
Right                Move cursor right
Down                 Move cursor down
Up                   Move cursor up

sLeft                Move cursor left one word
sRight               Move cursor right one word
sDown                Move cursor down one page
sUp                  Move cursor up one page

cLeft                Move cursor to start of line
cRight               Move cursor to end of line
cDown                Move cursor to end of file
cUp                  Move cursor to start of file

scLeft               Scroll window left
scRight              Scroll window right
scDown               Scroll window down
scUp                 Scroll window up

Miscellaneous keys

c[                   Insert "/* " (open ANSI-C comment)
c\                   Comment line (ANSI-C)
c]                   Insert " */" (close ANSI-C comment)
c-                   Select current word
c0                   Insert a NULL (zero byte)

sc[ (ctrl {)         Insert "#ifdef" (open pre-processor 'comment')
sc\ (ctrl |)         Uncomment line (ANSI-C)
sc] (ctrl })         Insert "#endif" (close pre-processor 'comment')
sc- (ctrl _)         Select current line
sc2 (ctrl ")         Insert "&quot;"
sc3 (ctrl £)         Insert "&pound;"
sc7 (ctrl &)         Insert "&amp;"
sc8 (ctrl *)         Insert "&bull;"
sc9 (ctrl ()         Insert "&lt;"
sc0 (ctrl ))         Insert "&gt;"

Keypad keys

sk/                  Insert date in format "Sat 19 Aug 2000"
skEnter              Toggle auto indent on/off
sk2                  Replace current word with its correct spelling
sk4                  Backwards interactive search
sk5                  Start spell checker
sk6                  Forward interactive search

ck/                  Run the program
ck*                  Present the user with a * prompt
ck-                  Delete to the start of the word
ck+                  Delete to the end of the word
ckEnter              As Return, but doesn't auto-indent
ck.                  Delete word containing the cursor
ck0                  Prefix key for Darren Salt's Miscellaneous keymap
ck1                  Move back one sector (disc edit mode)
ck3                  Move forward one sector (disc edit mode)
ck4                  Move back one track (disc edit mode)
ck5                  Spell check entire document (to Throwback buffer)
ck6                  Move forward one track (disc edit mode)

sck/                 Save, then run/compile program
sck-                 Insert "<hr>", followed by a newline
sckEnter             Insert "</p>"
sck1                 Insert my web site address  ** PERSONALISE THIS **
sck2                 Insert down arrow character
sck4                 Insert left arrow character
sck5                 Spell check selection (to Throwback buffer)
sck6                 Insert right arrow character
sck7                 Insert my email address  ** PERSONALISE THIS **
sck8                 Insert up arrow character

Function keys

F0 (Print)           Quick print
F2                   Open a new view on this file
F3                   Open the save dialogue
F4                   Open the search dialogue
F5                   Open the goto line/address dialogue
F6                   Drop a mark
F7                   Alter selection
F8                   Undo last operation (Full)
F9                   Redo operation
F10                  Select line(s), cursor to start of next line
F11                  Execute learned sequence

sF0 (sPrint)         Fancy print
sF1                  Get help on the word at the cursor (uses StrongHelp)
sF2                  Swap to other window and bring to front
sF3                  Open save selection dialogue
sF4                  Open the search to window dialogue
sF5                  Format paragraph
sF6                  Go to last match (in search)
sF7                  Go to next match (in search)
sF8                  Undo last operation (Fast)
sF9                  ASCII/Hex entry mode
sF10                 Start selection by cursor movement
sF11                 Bind learned sequence

cF0 (cPrint)         Open Printer:$
cF1                  Help on topic (uses StrongHelp)
cF2                  Close window
cF3                  Save without prompting
cF4                  Open replace dialogue
cF5                  Toggle word wrap
cF6                  Go to last mark
cF7                  Go to next mark
cF8                  Toggle mark
cF9                  Split line at cursor position
cF10                 Join lines

scF0 (scPrint)       Close Printer:$
scF1                 Help on Zap
scF2                 Close other open window
scF3                 Dump textual representation of file
scF4                 List function definitions
scF5                 Toggle line wrap on/off
scF6                 Go to last function
scF7                 Go to next function
scF8                 Find the function at the cursor
scF9                 Re-load the file
scF10                Renumber program

Control letters

cA                   Select entire buffer
cB                   Toggle block edit mode on/off
cC                   Copy selection to cursor
cD                   Duplicate line
cE                   Run a program, then exit
cF                   Bring window to front
cI                   Indent current line/selection
cJ                   Jump to the address given by the word at the cursor
                     (useful in Code mode)
cL                   Learn key sequence
cM                   Performs return action for current mode
cO                   Outdent current line/selection
cQ                   Quote next character
cR                   Toggle read only status
cS                   Swap case of next character/selection
cT                   Prefix key for Tabs keymap :
  cTSpace            Display tabs as spaces
  cTC                Column tab mode
  cTE                Edit tab mode (as line above)
  cTU                Unix tab mode
  cTS                Toggle 'Tabs as spaces' on/off (entry)
  cTA                Display tabs as an arrow
  cTD                Display tabs as dashes
  cTN                No tabs display
cU                   Universal argument - perform next instruction 'n' times
cV                   Move selection to the cursor
cW                   Prefix key for Window Control keymap :
  cWB                Put window to back
  cWF                Bring window to front
  cWH                Swap to/from header file
  cWT                Toggle window size
  cWW                Set the window width
cX                   Delete selection and place it in the clipboard
cY                   Paste the clipboard to the cursor
cZ                   Clear selection

scA                  Addresses shown at left
scB                  Drop program into BASIC
scC                  Copy selection to clipboard
scD                  Insert current date
scE                  Save then run a program, then exit
scF                  Filter selection (pass through a C program),
                     replacing the original selection with its output
scH                  Line numbers shown in hex/decimal
scI                  Re-indent current line of program source
scL                  Force lower case of next character/selection
scN                  Turn off line numbers/addresses
scO                  Logical line numbers shown at left
scP                  Physical line numbers shown at left
scR                  Toggle soft wrap
scS                  Swap next two characters
scT                  Insert current time
scU                  Force upper case of next character/selection
scW                  Toggles window wrap
scY                  Yank cyclically through deleted regions
scZ                  Prefix key for Emacs keymap - I don't use this
                     though the Emacs extension keymaps are all present.