# This file contains all of the editor's command and key linkages. # It also contains data for tables which are automatically generated in the # editor. # # It should be processed by the "mktbls" program, which produces the # headers #included by main.c # # All that is necessary to add a new function to the editor is to add # an entry to this file, write the function, make sure it's in the # makefile, and rebuild. (This is not to be confused with adding a # new key binding, which can be done with the rebind command if it # was compiled in.) # # If you want to know which keyboard bindings are already taken, look # at nebind.h, after you build it. # # The entries are functions within the editor. They _must_ match the # functions' names. On the same line as the name is the set of flags # describing that function. # Also accompanying each function is a list of english names for the # command, in double quotes, and a list of keys bound to the command, # in single quotes. These are the default key bindings -- they can change # at runtime. English names must be all lowercase. # Any function, name, or key may be followed by a conditional, i.e. the # name of a preprocessor #define which must be defined non-zero for that # line to become part of the editor. If a function name is made conditional, # the names and keys listed with it will be conditional also. # The names and keys must be preceded by a tab character. # Blank lines must be completely empty. # For convenience only, this table is kept in roughly alphabetical order, # by first character of function name. # # For example, consider the following entry: # # somefunc ABSM|MOTION BSD|DOS # "funkycom" # '^X-F' # 'FN-2' DOS # 'M-s' # # As a special case, if a function key definition ('FN-A') is followed # by a conditional beginning with "KEY_", like: # 'FN-A' KEY_Up # then that name is output to nefkeys.h as a SPEC|x definition, for use # by the screen/keyboard drivers. The key is also bound, as usual, and # is made conditional on the _third_ field on the line. (Since KEY_xxx # definitions are meant to be pretty generic, there should be little # need for conditional build-time binding.) # # This says that somefunc() is an absolute motion command, that it should # only be included in the editor if we're running BSD or DOS, that its # english name as one would type on the command line is "funkycom", and # that it is bound to ^X-F, to function key 2 under DOS, and to "meta-s", # that is, an 's' with the high bit set. # # Function flags have the following meanings: # REDO means the dotcmd command recorder should be halted, so that # the command can be redone. # UNDO means the undo stacks should be cleared, in preparation for # an undoable command. # OPER means the command is an "operator", that is, it acts on a region # demarcated by the current cursor position and the cursor # position following a subsequent motion command. # MOTION means this command moves dot, and specifically is compatible # with the operator commands. # FL only occurs with MOTION, means that if the motion is an argument # to an operator, the operation should affect Full Lines # ABSM only occurs with MOTION, means that the motion is absolute, # i.e. not relative to the current position or screen. It causes # the "lastdotmark", ldmark to be set to dot before the move # takes place. # GOAL signifies a motion that will attempt to retain the # current column position after the motion. # GLOBOK says the function can follow a global command # (e.g. the 'd' in "g/pattern/d") # # This file was designed and constructed by Paul Fox for vile, (c)1990 # # The flags given in parentheses are "ex" flags, related to what # kind of line-range arguments the command can take. Not all are # currently used or implemented, but they were defined in the # command table for the Steve Kirkendall's elvis editor, so I # included them here for completeness. # BANG says the command (in real vi) can take a trailing ! character, # and will behave differently. In vile, most such commands # have separate entries, e.g. quit and quithard and separate # functions which are executed. in some cases this is very # impractical, as is the case with w and w! -- so, if a command # is entered ending with a '!' (it must be in this table by # that name) _and_ the BANG flag is set for that command, then # the function will be invoked with "special" values for f and # n (i.e. values unlikely to be typed) so the function can # distinguish the two cases. # If the BANG flag appears, and there is no command-name ending # in '!' listed, then the flag does nothing, and should be # viewed simply as documentation. # # $Header: /usr2/foxharp/src/pgf/vile/RCS/cmdtbl,v 1.136 1996/04/16 02:29:34 pgf Exp $ # # abbrev NONE|(EXRCOK|EXTRA) "abbreviate" "show-abbreviations" altbuff NONE "alternate-buffer" !FEWNAMES '^^' append REDO|UNDO "append-chars" !FEWNAMES 'a' appstring REDO|UNDO !SMALLER "append-string" appendeol REDO|UNDO "append-chars-at-eol" !FEWNAMES 'A' backchar MOTION "backward-character" !FEWNAMES backchar_to_bol MOTION "backward-character-to-bol" !FEWNAMES "left-arrow" 'h' '^H' '^?' 'FN-D' KEY_Left backdelchar REDO|UNDO "delete-previous-character" !FEWNAMES 'X' backhunt ABSM|MOTION !SMALLER "hunt-backward" backhpage MOTION "previous-half-page" !FEWNAMES "back-half-page" !FEWNAMES "up-half-page" !FEWNAMES '^U' backline GOAL|MOTION|FL "previous-line" !FEWNAMES "back-line" !FEWNAMES "up-line" !FEWNAMES "up-arrow" !FEWNAMES 'k' '^P' 'FN-A' KEY_Up backbline MOTION|FL "previous-line-at-bol" !FEWNAMES "back-line-at-bol" !FEWNAMES "up-line-at-bol" !FEWNAMES '-' backpage MOTION "previous-page" !FEWNAMES "back-page" !FEWNAMES '^B' 'FN-p' KEY_Prior backword MOTION "previous-word" !FEWNAMES "back-word" !FEWNAMES 'B' # 'FN-\163' IBM_KBD backviword MOTION "previous-punctuated-word" !FEWNAMES "back-punctuated-word" !FEWNAMES 'b' backsearch ABSM|MOTION "search-reverse" !FEWNAMES '?' bcsrch MOTION "backward-char-scan" !FEWNAMES 'F' bcsrch_to MOTION "backward-char-scan-to" !FEWNAMES 'T' bindkey NONE OPT_REBIND "bind-key" "rebind-key" bktoshell NONE|(BANG) "suspend" "suspend!" "stop" "stop!" '^Z' cd NONE "cd" "change-directory" cntl_x_func NONE "cntl_x-prefix" '^X' chgchar REDO|UNDO "change-char" !FEWNAMES "delete-char-and-insert-chars" !FEWNAMES 's' chgline REDO|UNDO "change-line" !FEWNAMES "delete-line-and-insert-chars" !FEWNAMES 'S' chgtoeol REDO|UNDO "change-to-eol" !FEWNAMES "delete-to-eol-and-insert-chars" !FEWNAMES 'C' clear_match_attrs NONE OPT_HILITEMATCH "clear-visual-matches" '=' clrmes NONE "clear-message-line" !FEWNAMES comp_err_exps NONE OPT_FINDERR "compile-error-expressions" <(re)compile the [Error Expressions] buffer> consearch ABSM|MOTION "continue-search" !FEWNAMES 'n' wordcount RANGE OPT_WORDCOUNT "count-words" opercopy OPER|(RANGE|EXTRA) "copy-til" "c" kbd_mac_begin NONE "begin-keyboard-macro" !FEWNAMES '^X-(' kbd_mac_end NONE "end-keyboard-macro" !FEWNAMES '^X-)' kbd_mac_exec REDO|UNDO|VIEWOK "execute-keyboard-macro" !FEWNAMES '^X-&' kbd_mac_save NONE "save-keyboard-macro" '^X-^' cbuf1 REDO "execute-macro-1" !FEWNAMES 'FN-1' KEY_F1 'FN-P' KEY_KP_F1 cbuf2 REDO "execute-macro-2" !FEWNAMES 'FN-2' KEY_F2 'FN-Q' KEY_KP_F2 cbuf3 REDO "execute-macro-3" !FEWNAMES 'FN-3' KEY_F3 'FN-R' KEY_KP_F3 cbuf4 REDO "execute-macro-4" !FEWNAMES 'FN-4' KEY_F4 'FN-S' KEY_KP_F4 cbuf5 REDO "execute-macro-5" !FEWNAMES 'FN-5' KEY_F5 cbuf6 REDO "execute-macro-6" !FEWNAMES 'FN-6' KEY_F6 cbuf7 REDO "execute-macro-7" !FEWNAMES 'FN-7' KEY_F7 cbuf8 REDO "execute-macro-8" !FEWNAMES 'FN-8' KEY_F8 cbuf9 REDO "execute-macro-9" !FEWNAMES 'FN-9' KEY_F9 cbuf10 REDO 'FN-0' KEY_F10 "execute-macro-10" !FEWNAMES cbuf11 REDO !SMALLER "execute-macro-11" !FEWNAMES cbuf12 REDO !SMALLER 'FN-@' KEY_F12 "execute-macro-12" !FEWNAMES cbuf13 REDO !SMALLER 'FN-#' KEY_F13 "execute-macro-13" !FEWNAMES cbuf14 REDO !SMALLER 'FN-$' KEY_F14 "execute-macro-14" !FEWNAMES cbuf15 REDO !SMALLER 'FN-%' KEY_F15 "execute-macro-15" !FEWNAMES cbuf16 REDO !SMALLER 'FN-^' KEY_F16 "execute-macro-16" !FEWNAMES cbuf17 REDO !SMALLER 'FN-&' KEY_F17 "execute-macro-17" !FEWNAMES cbuf18 REDO !SMALLER 'FN-*' KEY_F18 "execute-macro-18" !FEWNAMES cbuf19 REDO !SMALLER 'FN-(' KEY_F19 "execute-macro-19" !FEWNAMES cbuf20 REDO !SMALLER 'FN-)' KEY_F20 "execute-macro-20" !FEWNAMES cbuf21 REDO !SMALLER "execute-macro-21" !FEWNAMES cbuf22 REDO !SMALLER "execute-macro-22" !FEWNAMES cbuf23 REDO !SMALLER "execute-macro-23" !FEWNAMES cbuf24 REDO !SMALLER "execute-macro-24" !FEWNAMES cbuf25 REDO !SMALLER "execute-macro-25" !FEWNAMES cbuf26 REDO !SMALLER "execute-macro-26" !FEWNAMES cbuf27 REDO !SMALLER "execute-macro-27" !FEWNAMES cbuf28 REDO !SMALLER "execute-macro-28" !FEWNAMES cbuf29 REDO !SMALLER "execute-macro-29" !FEWNAMES cbuf30 REDO !SMALLER "execute-macro-30" !FEWNAMES cbuf31 REDO !SMALLER "execute-macro-31" !FEWNAMES cbuf32 REDO !SMALLER "execute-macro-32" !FEWNAMES cbuf33 REDO !SMALLER "execute-macro-33" !FEWNAMES cbuf34 REDO !SMALLER "execute-macro-34" !FEWNAMES cbuf35 REDO !SMALLER "execute-macro-35" !FEWNAMES cbuf36 REDO !SMALLER "execute-macro-36" !FEWNAMES cbuf37 REDO !SMALLER "execute-macro-37" !FEWNAMES cbuf38 REDO !SMALLER "execute-macro-38" !FEWNAMES cbuf39 REDO !SMALLER "execute-macro-39" !FEWNAMES cbuf40 REDO !SMALLER "execute-macro-40" !FEWNAMES delwind NONE "delete-window" !FEWNAMES '^K' '^X-0' forceblank REDO|UNDO OPT_AEDIT "delete-blank-lines" !FEWNAMES "force-blank-lines" !FEWNAMES '^A-d' delglobmode NONE "delete-global-mode" !FEWNAMES "setgno" "unsetg" "setno" "unset" dellocmode NONE|(EXRCOK|EXTRA) "delete-mode" !FEWNAMES "setlno" "unsetl" deltoeol REDO|UNDO "delete-to-eol" !FEWNAMES 'D' desbind NONE OPT_REBIND "list-commands" "describe-bindings" "show-commands" "show-bindings" desmotions NONE OPT_REBIND "list-motions" "describe-motions" "show-motions" desopers NONE OPT_REBIND "list-operators" "describe-operators" "show-operators" desapro NONE OPT_REBIND "apropos" "list-commands-apropos-to" desfunc NONE OPT_REBIND "describe-function" "show-function" deskey NONE OPT_REBIND "describe-key" dotcmdplay UNDO "repeat-last-cmd" !FEWNAMES '.' ex NONE|(BANG|FILE1) "ex" execbuf NONE !SMALLER "execute-buffer" !FEWNAMES execfile NONE !SMALLER "execute-file" !FEWNAMES "source" execkreg REDO|UNDO|VIEWOK "execute-register" '@' execproc REDO OPT_PROCEDURES "execute-procedure" !FEWNAMES "run" enlargewind NONE "grow-window" !FEWNAMES 'V' esc_func NONE "abort-command" !FEWNAMES '^[' 'FN-!' KEY_F11 flow_control_enable NONE SYS_UNIX "flow-control-enable" fcsrch MOTION "forward-char-scan" !FEWNAMES 'f' fcsrch_to MOTION "forward-char-scan-up-to" !FEWNAMES 't' filefind NONE|(BANG|FILE1|PLUS) "e" "E" "edit-file" !FEWNAMES "find-file" !FEWNAMES '^X-e' fileread NONE "e!" "replace-with-file" !FEWNAMES filename NONE|(NAMEDF) "change-file-name" !FEWNAMES "f" "file" "filename" filesave NONE|BANG !SMALLER "save-file" "save-file!" filewrite NONE|BANG "write-file" !FEWNAMES "write-file!" !FEWNAMES filter REDO|UNDO "|" "filter-buffer" !FEWNAMES finderr NONE OPT_FINDERR "find-next-error" !FEWNAMES '^X-^X' finderrbuf NONE OPT_FINDERR "find-next-error-buffer-name" "error-buffer" firstbuffer NONE "rewind" firstnonwhite MOTION "first-nonwhite" !FEWNAMES '^' fisearch NONE OPT_ISRCH "incremental-search" !FEWNAMES '^X-S' flipchar REDO|UNDO "flip-character" !FEWNAMES '~' fnclabel NONE DISP_HP150 "label-function-key" !FEWNAMES "label-fkey"