Control keys
Basic operation of the editor is largely self explanatory. Text is
input by straight typing anywhere on the screen. Cursor movement is
controlled by the arrow keys and auxiliary keypad keys as per their
standard definitions as well as accelerated movement with Ctrl
combinations. The cursor can also be positioned using the mouse by
clicking with the left button at the desired cursor location.
The cursor position control keys are as follows:
Un-mapped Cursor Motion Keys
left arrow left one space
right arrow right one space
up arrow up one line
down arrow down one line
end end of line
home beginning of line
PgDn scroll down one screen
PgUp scroll up one screen
Center Key fast motion toggle
Ctrl left left one word
Ctrl right right one word
Ctrl up scroll up five lines
Ctrl down scroll down five lines
Ctrl end end of file
Ctrl PgDn end of file
Ctrl home beginning of file
Ctrl PgUp beginning of file
Alt home top of page
Alt end bottom of page
Alt PgUp scroll up half a page
Alt PgDn scroll down half a page
Un-mapped Editor Control Keys not discussed in other sections
Ctrl a set place mark
Ctrl A save all changed files
Ctrl b bracket match {, (, [, <, or /*
Ctrl c change case of character under cursor
Ctrl C opens configuration notebook (OS/2)
Ctrl d delete character
Ctrl D read in the displayed macro list
DEL delete character
Ctrl e delete to end of line
Ctrl h destructive backspace
Ctrl H open select other loaded file dialog
Ctrl g execute file (C interpreter version)
Ctrl i tab
Ctrl j join next line to current line
Ctrl k cut current line at cursor
Ctrl K list the currently defined key mappings
Ctrl l return to previous set place mark
Ctrl L list the currently defined macros
Ctrl m insert new line (also return key)
Ctrl M open command line input dialog
Ctrl n edit next file in ring
Ctrl o switch to other window if screen split
Ctrl O open file select dialog
Ctrl p edit previous file in ring
Ctrl q quit without saving file
Ctrl r redo previous undo
Ctrl s swap current and next character
Ctrl t toggle insert/replace
Ctrl u undo changes to last modified line
Ctrl w write file to disk
Ctrl W write file to disk with different name
Ctrl x delete line
Ctrl y split edit window horizontally in two
Ctrl Y read in the displayed key mappings
Ctrl BACK delete line
Ctrl z zap word
Ctrl DEL zap word
Alt a alternate binary representation
Alt B set breakpoint (interpreter version)
Alt e execute last macro
Alt D defines (interpreter version)
Alt G global vars (interpreter version)
Alt h view only lines with place mark
Alt i clear all place marks
Alt I step into (interpreter version)
Alt k enter next char literally
Alt L local vars (interpreter version)
Alt O step over (interpreter version)
Alt p position curs at previous location
Alt q restore a line from undo record
Alt r re-flow paragraph, stops at blank line
Alt O reset execution (interpreter version)
Alt s view lines containing search string
Alt t teach (end) new macro
Alt v view only changed lines
Alt x enter control character
Alt z zero command multiplier
Alt 0-9 enter command multiplier
The following section provides more detailed information for a selection
of the above commands that are perhaps not inherently obvious.
- The Ctrl a command sets a place mark on the current line in the current file.
Any number of place marks can be set. Hitting Ctrl l will return the
cursor to these place marks in the reverse order that they where set. To
remove a place mark hit Ctrl a again on the line with the place mark and it
will be removed. Alt i removes all currently set place marks and Alt h shows
only lines on which a place mark has been set.
- The bracket match command Ctrl b moves the cursor to the bracket matching the
one under the cursor. If the cursor does not move it means that a
matching bracket could not be found or that the cursor is not presently
sitting on a bracket. The matchable characters are <, >, (, ), {, }, [, ]
and the comment delimiter pairs. The comment delimiter
pairs are set in the syntax colouring configuration dialog and are
/* and */ by default.
- Ctrl c changes the case of the letter under the cursor. If the case of a
whole region is to be changed. Block mark the region (Alt b) and then use
the change case option of the block fill command (Alt f).
- Ctrl j, k, m. Unlike most editors hitting return ( Ctrl m ) does not split the
current line at the cursor. Instead a line is split at the cursor using Ctrl
k. This usage may take some getting use to but it is the same as used by the
editor E and optionally by the EPM editor. If, however, you prefer more
conventional return key behaviour this can be set in the configuration menu.
Ctrl j is used to join two lines together. Return or Ctrl m inserts a new
blank line below the current line but the current line is not split.
- Ctrl n, p. If more than one file is currently in memory then Ctrl n
switches to the next one in the ring while Ctrl p switches to the
previous file. If the switched to file has been modified externally to the editor
since it was last seen you will be prompted for an optional reload.
- Ctrl q. Quits the current file which will be removed from memory and all
changes will be lost. If changes have been made and the file has not been
saved then you will be prompted for confirmation. It is possible to
configure the editor to prompt for a confirmation before over writing an old
version of the file.
- Ctrl u, r. Undo the change to the last edited line. The number of undo
levels is set in the configuration dialog and is essentially unlimited.
By repeatedly hitting Ctrl u all the changes made to a file since it was
loaded can be undone. Ctrl r re-does a previous undo. The changes to a
file can only be undone in the order that they where made except that any
line for which a line undo record exists can be restored using Alt q.
Only simple edits that only operate on a single line generate
undo records of the type that can be undone using Alt q. In some instances
it may be desirable to turn off the undo record generation for example if
column manipulations are to be done on very long columns since in that
case the entire file will have to be duplicated may times for the undo
records which will adversely affect performance. Undo record generation
may be turned off by setting the undo limit to zero in the config dialog
of the file menu.
- Ctrl w. Saves the current file to disk using the file name displayed on
the command line. The file name can be changed by moving to the command
line ESC and using the rename command. The file can also be saved with a
different name using the ``save as'' menu item of the file menu. Before
writting the existing file of this name is renamed ``editfile.bak''. Thus
writting a file may be undone provided no subsequent files were written.
- Ctrl y splits the editor window horizontally in to two windows separated
by a second command line. Hitting Ctrl y again un-splits the screen. Use
Ctrl o or the left mouse button to change the current window. These
commands are not available in the version of the editor bundled with
Splot.
- Alt a selects the alternate binary representation. This key is only
active for files loaded using the binary switch (-b). The default binary
representation is hex with two hex characters per byte and 32 bytes per
line. The alternate representation uses the following codes: Printable
characters appear with a leading underscore and control characters with a
leading ∧. This second representation also has 32 bytes per line
and is more useful for identifying text in binary files. Individual hex
numbers may be converted to decimal or the reverse by using the command
line commands ``hex'', ``dec'' and ``asc''.
- Alt e executes the last defined macro see section .
- Alt i removes all previously set (Ctrl a) place marks.
- Alt k interprets the next character as a literal without re-mapping. This
key may be useful for enter characters that have been mapped onto editor
commands. This should not be needed with the default configuration since
only Ctrl and Alt keys are used to control the editor.
- The Alt p command is useful if the cursor was accidentally moved away from
the region of interest with a Ctrl Home or search for example. In these
situations Alt p will restore the cursor to its previous location. This
action is similar to using place marks except that unlike place marks these
are automatically set by any command that causes the cursor to jump by more
than one line. Only one previous location is remembered though.
- The Alt r command re-flows a paragraph with the right and left margins
and the first line indentation set as specified in the config dialog.
It starts at the current line and stops at the first encountered blank
line. If a region is Alt b marked and the cursor is currently
in the marked region the marked region only will be reformatted with
the right and left margins set by the marking and no initial indentation.
If syntax colouring is on then the file is assumed to be program code and
is reformatted as code rather than text using a set of rules that are
currently not configurable. In this case the region to be reformatted must
be line marked.
- Alt t starts and ends the definition of a new macro see section .
- Alt x queries the user for the 3 digit hex code of the character to be
inserted. Alt x can thus be used to enter characters for which there is
no keyboard key such as the characters above 127 in the ASCII table.
- Alt 0-9, z. These keys are used to enter a command multiplier to be used
on the next command. Entering a multiplier has the same effect as
entering the following keystroke n times. Alt z resets the multiplier to zero.
- Alt F4. The system default close application key removes all loaded files
and terminates the editor. If there are any changed unsaved files a
confirmation dialog appears. Other system menu Alt F# keys perform their usual
task. These keys are intercepted before reaching the editor and thus cannot be
used for bound macros.