HELP VEDKEYS Robert Duncan, Nov 1989
Revised Aug 1993
Default key bindings in Ved.
Important Note
The default key bindings have changed in Poplog 14.5: the
bindings described here are what were previously called
vednewkeys and the previous bindings have been renamed as
vedoldkeys. Users who want to restore the old bindings can do
so: see HELP * VEDOLDKEYS for details.
CONTENTS - (Use <ENTER> g to access required sections)
1 Introduction
2 Notation Used in This File
3 Special Characters
4 Key Bindings by Function
4.1 Moving the Cursor
4.2 Inserting
4.3 Deleting
4.4 Yanking Deleted Text
4.5 Searching
4.6 Windows and Files
4.7 The Command Line
4.8 The Marked Range
4.9 The Position Stack
4.10 Compiling
4.11 Miscellaneous Editing Functions
4.12 Switching Modes
4.13 Getting Help
5 Key Bindings by Key
5.1 Control Keys
5.2 Escape Keys
5.3 Delete Keys
5.4 Undelete (Yank) Keys
6 Customising Ved
-----------------------------------------------------------------------
1 Introduction
-----------------------------------------------------------------------
This file describes the default set of key bindings provided by Ved,
i.e. the default mapping from key presses to editor functions. These
default bindings are built in to Ved and are standard across all
terminals, because they do not assume the existence of function keys or
keypads or other keyboard-specific features.
The key bindings described here are the so-called ``new'' bindings
introduced in Poplog 14.0 and made the default in Poplog 14.5. They are
associated with the procedure vednewkeys, and you can at any time
restore Ved's keymap to exactly the state described here simply by
calling this procedure:
vednewkeys();
NB: this will erase any custom bindings you may have installed.
The new bindings share a small common core with the Emacs editor, but
confirmed Emacs users might like to see HELP * VEDEMACS which describes
an alternative set of bindings mapping common Emacs key sequences to
similar Ved functions.
Traditional Ved users, familiar with the old key bindings used prior to
Poplog 14.5, should consult HELP * VEDOLDKEYS for details of how to
restore those bindings as the default.
For most users, the default keymap will be customised on startup for the
particular terminal on which Ved is running: the mechanisms for this are
described in HELP * TERMINAL and a list of help files describing
different terminal configurations can be found in HELP * VED/Terminal
and in REF * VEDTERMINALS. Most of these configurations define their own
key bindings to make use of function keys on the terminal keyboard.
These bindings are typically extra to those described here, but some
libraries (most notably the Visual 200 and derivatives) do redefine some
of the defaults. You can view the keymap used by your terminal (if any)
with the command:
<ENTER> hkeys
To prevent terminal libraries from binding these extra keys, you can
assign <false> to the variable vedfunctionkeys:
false -> vedfunctionkeys;
This line should go at the top of your "vedinit.p" file.
-----------------------------------------------------------------------
2 Notation Used in This File
-----------------------------------------------------------------------
In the descriptions of key bindings which follow, the notation:
^X
(pronounced "control X") stands for the single character generated by
pressing the <CTRL> key and the X key simultaneously. Control characters
are traditionally written as upper case, but either case will do.
The notation:
ESC X
(pronounced "escape X") is a two character sequence, generated by
pressing first the <ESC> key and then the X key. The case of X is
significant here. Not all keyboards have an <ESC> key clearly marked. If
you can't find one, it can be simulated by typing ^[. (Note to Emacs
users: Ved will not accept META-X in place of ESC X.)
Longer sequences are built up in the obvious way, so that
ESC ^X
is generated by pressing first <ESC> and then ^X.
The keys TAB, LF and RETURN are the tab, line-feed and carriage-return
keys. They are normally marked as such on the keyboard, but just in
case, the correspondences are:
TAB ^I
LF ^J
RETURN ^M
The DEL or "delete" key may be marked in various ways, but has no
obvious alternative.
Ved procedures are referred to by their logical names, e.g. CHARUP for
the procedure vedcharup. See HELP * LOGICAL_KEYS.
-----------------------------------------------------------------------
3 Special Characters
-----------------------------------------------------------------------
The characters
^O ^Q ^S ^X ^Y
are often interpreted specially by the operating system or by the
terminal and so are not usually used by Ved.
You can interrupt Ved with the standard INTERRUPT key defined for your
system.
-----------------------------------------------------------------------
4 Key Bindings by Function
-----------------------------------------------------------------------
4.1 Moving the Cursor
----------------------
Key Function Ved Procedure
^P Move up one line CHARUP
^N Move down one line CHARDOWN
^B Move left one character CHARLEFT
^H Move left one character CHARLEFT
^F Move right one character CHARRIGHT
ESC ^P Move up several lines CHARUPLOTS
ESC ^N Move down several lines CHARDOWNLOTS
ESC ^B Move left several characters CHARLEFTLOTS
ESC ^F Move right several characters CHARRIGHTLOTS
ESC b Move left one word WORDLEFT
ESC f Move right one word WORD RIGHT
ESC v Screen up SCREENUP
^V Screen down SCREENDOWN
^A Move to left edge of screen SCREENLEFT
ESC ^E Move to right edge of screen SCREENRIGHT
ESC ^A Move to start of line TEXTLEFT
^E Move to end of line TEXTRIGHT
LF Move to start of next line NEXTLINE
ESC { Go to start of previous paragraph PREVPARA
ESC } Go to start of next paragraph NEXTPARA
ESC < Go to top of file TOPFILE
ESC > Go to end of file ENDFILE
ESC g Go to start of marked range MARKFIND
ESC G Go to end of marked range ENDRANGE
ESC TAB Move to next tab stop TABRIGHT
To go to a particular line number, e.g. line 123, do:
<ENTER> 123
See also the section on 'Searching' below.
4.2 Inserting
--------------
Key Function Ved Procedure
ESC o Open new line above current LINEABOVE
ESC O Open new line below current LINEBELOW
All printing characters are inserted immediately at the current cursor
position. Characters after the cursor are normally shifted right to make
room, but setting vedstatic causes existing characters to be overwritten
instead (see the section 'Switching Modes' below).
Tab and carriage return characters are interpreted as follows:
TAB Inserts a single tab character at the current cursor
position, or if vednotabs is <true>, sufficient spaces to
pad to the next tab stop. See HELP * VEDNOTABS.
RETURN In normal mode, this breaks the current line at the cursor
position. In immediate mode (see HELP * IM), the line is
sent to the compiler.
4.3 Deleting
-------------
Key Function Ved Procedure
^R Delete character under cursor DOTDELETE
DEL Delete character to left of cursor CHARDELETE
^W Delete word to left of cursor WORDLEFTDELETE
^U Delete line to left of cursor CLEARHEAD
^K ^B Delete word to left of cursor WORDLEFTDELETE
^K ^F Delete word to right of cursor WORDRIGHTDELETE
^K ^A Delete line to left of cursor CLEARHEAD
^K ^E Delete line to right of cursor CLEARTAIL
^K ^K Delete current line LINEDELETE
^K ^D Delete marked range ENTER d
^K ^P Delete region between stacked positions ENTER cut
4.4 Yanking Deleted Text
-------------------------
Key Function Ved Procedure
ESC ^W Yank word ENTER yankw
ESC ^U Yank word ENTER yankw
ESC ^K ^B Yank word ENTER yankw
ESC ^K ^F Yank word ENTER yankw
ESC ^K ^A Yank word ENTER yankw
ESC ^K ^E Yank word ENTER yankw
ESC ^K ^K Yank line ENTER yankl
ESC ^K ^D Yank range ENTER y
ESC ^K ^P Yank region ENTER splice
The last non-empty line deleted can be recovered with YANKL; the last
word or part line deleted can be recovered with YANKW. There is no ring
or stack of delete buffers: only the last thing deleted can be
recovered. See HELP * YANK for full details.
Note that for any keystroke sequence leading to a deletion of more than
one character, prefixing the same key sequence with ESC will undo the
deletion, at least in the default Ved key mapping.
4.5 Searching
--------------
Key Function Ved Procedure
ESC / Repeat last search forwards ENTER re_search
ESC \ Repeat last search backwards ENTER re_back_search
To search forwards for a given string, do
<ENTER> /<string>
See HELP * VEDSEARCH for a summary of search and replace commands.
4.6 Windows and Files
----------------------
Key Function Ved Procedure
^L Refresh the current window REFRESH
ESC w Toggle half/full-screen window SETWINDOW
ESC x Switch to other window SWAPFILES
ESC V Screen up in other window ENTER xup
ESC ^V Screen down in other window ENTER xdn
ESC e Enter file selection menu FILESELECT
ESC q Quit the current file ENTER q
ESC F Complete file name to left of cursor FILECOMPLETE
4.7 The Command Line
---------------------
Key Function Ved Procedure
^G Enter a command ENTER
ESC ^G Switch to/from command line SWITCHSTATUS
ESC RETURN Redo command on command line REDOCOMMAND
4.8 The Marked Range
---------------------
Key Function Ved Procedure
ESC m Mark start of range MARKLO
ESC M Mark end of range MARKHI
ESC C Mark the current procedure ENTER mcp
ESC g Go to start of marked range MARKFIND
ESC G Go to end of marked range ENDRANGE
^D Compile the marked range ENTER lmr
^K ^D Delete the marked range ENTER d
ESC ^K ^D Yank range ENTER y
See HELP * MARK for a full description of the marked range.
4.9 The Position Stack
-----------------------
Key Function Ved Procedure
ESC p Push current position on position stack PUSHKEY
ESC P Pop last stacked position POPKEY
ESC s Swap current and stacked positions EXCHANGEPOSITION
^K ^P Delete region between stacked positions ENTER cut
ESC ^K ^P Yank region ENTER splice
4.10 Compiling
---------------
Key Function Ved Procedure
^D Compile the marked range ENTER lmr
ESC c Compile the current procedure ENTER lcp
ESC d Compile the current line LOADLINE
In immediate mode:
RETURN Send current line to compiler
ESC ^D Toggle input on RETURN
ESC ^Z Send end-of-file to immediate-mode compiler ENTER end_im
(NOT available to Unix users who use ^Z as
the suspend character)
See HELP * LMR, * IM.
4.11 Miscellaneous Editing Functions
-------------------------------------
Key Function Ved Procedure
^T Transpose two characters to left of cursor ENTER sw
ESC l Change current word to lower case ENTER lcw
ESC u Change current word to upper case ENTER ucw
ESC . Change case of character under cursor CHANGECASE
ESC j Justify current paragraph/procedure ENTER jp
ESC J Justify and fill the current paragraph ENTER jjp
4.12 Switching Modes
---------------------
Key Function Ved Procedure
ESC # Toggle static (overstrike) mode SETSTATIC
ESC z Toggle hard tabs
ESC ^D Toggle input on RETURN in immediate mode
4.13 Getting Help
------------------
Key Function Ved Procedure
ESC h Get help on current word GETSYSFILE
ESC k Show a key binding ENTER hk
ESC K Get HELP file for current keyboard ENTER hkeys
ESC n Search for next isolated asterisk NEXTHELP
ESC N Search for previous isolated asterisk PREVIOUSHELP
Isolated asterisks usually indicate help cross-references: to follow up
a cross-reference, type <ESC> n to locate the asterisk, then <ESC> h to
get the corresponding help, teach or ref file.
Try (for example) HELP * HELP.
-----------------------------------------------------------------------
5 Key Bindings by Key
-----------------------------------------------------------------------
5.1 Control Keys
-----------------
Key Function Ved Procedure
^A Move to left edge of screen SCREENLEFT
^B Move left one character CHARLEFT
^C Interrupt DOINTERRUPT
^D Compile the marked range ENTER lmr
^E Move to end of line TEXTRIGHT
^F Move right one character CHARRIGHT
^G Enter a command ENTER
^H Move left one character CHARLEFT
TAB Insert tab
LF Move to start of next line NEXTLINE
^K Start of delete sequence (see below)
^L Refresh the current window REFRESH
RETURN Break line at cursor position DOCR
^N Move down one line CHARDOWN
^P Move up one line CHARUP
^R Delete character under cursor DOTDELETE
^T Transpose two characters to left of cursor ENTER sw
^U Delete line to left of cursor CLEARHEAD
^V Screen down SCREENDOWN
^W Delete word to left of cursor WORDLEFTDELETE
DEL Delete character to left of cursor CHARDELETE
5.2 Escape Keys
----------------
Key Function Ved Procedure
ESC ^A Move to start of line TEXTLEFT
ESC ^B Move left several characters CHARLEFTLOTS
ESC ^D Toggle input on RETURN in immediate mode
ESC ^E Move to right edge of screen SCREENRIGHT
ESC ^F Move right several characters CHARRIGHTLOTS
ESC ^G Switch to/from command line SWITCHSTATUS
ESC ^H Screen up in other window ENTER xup
ESC TAB Move to next tab stop TABRIGHT
ESC LF Screen down in other window ENTER xdn
ESC RETURN Redo command on command line REDOCOMMAND
ESC ^N Move down several lines CHARDOWNLOTS
ESC ^P Move up several lines CHARUPLOTS
ESC ^U Yank word ENTER yankw
ESC ^V Screen down in other window ENTER xdn
ESC ^W Yank word ENTER yankw
ESC ^Z Send end-of-file to immediate-mode compiler ENTER end_im
(NOT available for Unix users who use ^Z
as the suspend character)
ESC b Move left one word WORDLEFT
ESC c Compile the current procedure ENTER lcp
ESC d Compile the current line LOADLINE
ESC e Enter file selection menu FILESELECT
ESC f Move right one word WORD RIGHT
ESC g Go to start of marked range MARKFIND
ESC h Get help on current word GETSYSFILE
ESC j Justify current paragraph/procedure ENTER jp
ESC k Show a key binding ENTER hk
ESC l Change current word to lower case ENTER lcw
ESC m Mark start of range MARKLO
ESC n Search for next isolated asterisk NEXTHELP
ESC o Open new line above current LINEABOVE
ESC p Push current position on position stack PUSHKEY
ESC q Quit the current file ENTER q
ESC s Swap current and stacked positions EXCHANGEPOSITION
ESC u Change current word to upper case ENTER ucw
ESC v Screen up SCREENUP
ESC w Toggle half/full-screen window SETWINDOW
ESC x Switch to other window SWAPFILES
ESC z Toggle hard tabs
ESC C Mark the current procedure ENTER mcp
ESC F Complete file name to left of cursor FILECOMPLETE
ESC G Go to end of marked range ENDRANGE
ESC J Justify and fill the current paragraph ENTER jjp
ESC K Get HELP file for current keyboard ENTER hkeys
ESC M Mark end of range MARKHI
ESC N Search for previous isolated asterisk PREVIOUSHELP
ESC O Open new line below current LINEBELOW
ESC P Pop last stacked position POPKEY
ESC V Screen up in other window ENTER xup
ESC # Toggle static (overstrike) mode SETSTATIC
ESC . Change case of character under cursor CHANGECASE
ESC / Repeat last search forwards ENTER re_search
ESC \ Repeat last search backwards ENTER re_back_search
ESC { Go to start of previous paragraph PREVPARA
ESC } Go to start of next paragraph NEXTPARA
ESC < Go to top of file TOPFILE
ESC > Go to end of file ENDFILE
5.3 Delete Keys
----------------
Key Function Ved Procedure
^K ^B Delete word to left of cursor WORDLEFTDELETE
^K ^F Delete word to right of cursor WORDRIGHTDELETE
^K ^A Delete line to left of cursor CLEARHEAD
^K ^E Delete line to right of cursor CLEARTAIL
^K ^K Delete current line LINEDELETE
^K ^D Delete marked range ENTER d
^K ^P Delete region between stacked positions ENTER cut
5.4 Undelete (Yank) Keys
-------------------------
Key Function Ved Procedure
ESC ^K ^B Yank word ENTER yankw
ESC ^K ^F Yank word ENTER yankw
ESC ^K ^A Yank word ENTER yankw
ESC ^K ^E Yank word ENTER yankw
ESC ^K ^K Yank line ENTER yankl
ESC ^K ^D Yank range ENTER y
ESC ^K ^P Yank region ENTER splice
-----------------------------------------------------------------------
6 Customising Ved
-----------------------------------------------------------------------
To customise Ved for a particular terminal, see:
HELP * TERMINAL
REF * VEDTERMINALS
To define your own key bindings, see:
HELP * DK
HELP * VEDSET
For general guidance on tailoring Ved, see:
HELP * INITIAL
--- C.all/help/vedkeys
--- Copyright University of Sussex 1994. All rights reserved.Author: Robert Duncan, Nov 1989