home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vile-src.zip / vile-8.1 / cmdtbl < prev    next >
Text File  |  1998-09-07  |  47KB  |  1,602 lines

  1. # This file contains all of the editor's command and key linkages.
  2. # It also contains data for tables which are automatically generated in the
  3. # editor.
  4. #
  5. # It should be processed by the "mktbls" program, which produces the
  6. #  headers #included by main.c
  7. #
  8. # All that is necessary to add a new function to the editor is to add
  9. #  an entry to this file, write the function, make sure it's in the
  10. #  makefile, and rebuild.  (This is not to be confused with adding a
  11. #  new key binding, which can be done with the rebind command if it
  12. #  was compiled in.)
  13. #
  14. # If you want to know which keyboard bindings are already taken, look
  15. #  at nebind.h, after you build it.
  16. #
  17. # The entries are functions within the editor.  They _must_ match the
  18. #  functions' names.  On the same line as the name is the set of flags
  19. #  describing that function.
  20. # Also accompanying each function is a list of english names  for the
  21. #  command, in double quotes, and a list of keys bound to the command,
  22. #  in single quotes.  These are the default key bindings -- they can change
  23. #  at runtime.  English names must be all lowercase.
  24. # Any function, name, or key may be followed by a conditional, i.e. the
  25. #  name of a preprocessor #define which must be defined non-zero for that
  26. #  line to become part of the editor.  If a function name is made conditional,
  27. #  the names and keys listed with it will be conditional also.
  28. # The names and keys must be preceded by a tab character.
  29. # Blank lines must be completely empty.
  30. # For convenience only, this table is kept in roughly alphabetical order,
  31. #  by first character of function name.
  32. #
  33. # For example, consider the following entry:
  34. #
  35. #     somefunc    ABSM|MOTION        BSD|DOS
  36. #        "funkycom"
  37. #        '^X-F'
  38. #        'FN-2'                DOS
  39. #        'M-s'
  40. #
  41. # As a special case, if a function key definition ('FN-A') is followed
  42. # by a conditional beginning with "KEY_", like:
  43. #        'FN-A'                KEY_Up
  44. # then that name is output to nefkeys.h as a SPEC|x definition, for use
  45. # by the screen/keyboard drivers.  The key is also bound, as usual, and
  46. # is made conditional on the _third_ field on the line.  (Since KEY_xxx
  47. # definitions are meant to be pretty generic, there should be little
  48. # need for conditional build-time binding.)
  49. #
  50. # This says that somefunc() is an absolute motion command, that it should
  51. #  only be included in the editor if we're running BSD or DOS, that its
  52. #  english name as one would type on the command line is "funkycom", and
  53. #  that it is bound to ^X-F, to function key 2 under DOS, and to "meta-s",
  54. #  that is, an 's' with the high bit set.
  55. #
  56. # Function flags have the following meanings:
  57. #    REDO means the dotcmd command recorder should be halted, so that
  58. #        the command can be redone.
  59. #    UNDO means the undo stacks should be cleared, in preparation for
  60. #        an undoable command.
  61. #    OPER means the command is an "operator", that is, it acts on a region
  62. #        demarcated by the current cursor position and the cursor
  63. #        position following a subsequent motion command.
  64. #    MOTION means this command moves dot, and specifically is compatible
  65. #        with the operator commands.
  66. #    FL only occurs with MOTION, means that if the motion is an argument
  67. #        to an operator, the operation should affect Full Lines
  68. #    ABSM only occurs with MOTION, means that the motion is absolute,
  69. #        i.e. not relative to the current position or screen.  It causes
  70. #        the "lastdotmark", ldmark to be set to dot before the move
  71. #        takes place.
  72. #    GOAL signifies a motion that will attempt to retain the
  73. #        current column position after the motion.
  74. #    GLOBOK says the function can follow a global command
  75. #        (e.g. the 'd' in "g/pattern/d")
  76. #
  77. #    This file was designed and constructed by Paul Fox for vile, (c)1990
  78. #
  79. #    The flags given in parentheses are "ex" flags, related to what
  80. #        kind of line-range arguments the command can take.  Not all are
  81. #        currently used or implemented, but they were defined in the
  82. #        command table for the Steve Kirkendall's elvis editor, so I
  83. #        included them here for completeness.
  84. #    BANG says the command (in real vi) can take a trailing ! character,
  85. #        and will behave differently.  In vile, most such commands
  86. #        have separate entries, e.g. quit and quithard and separate
  87. #        functions which are executed.  in some cases this is very
  88. #        impractical, as is the case with w and w!  -- so, if a command
  89. #        is entered ending with a '!' (it must be in this table by
  90. #        that name) _and_ the BANG flag is set for that command, then
  91. #        the function will be invoked with "special" values for f and
  92. #        n (i.e. values unlikely to be typed) so the function can
  93. #        distinguish the two cases.
  94. #        If the BANG flag appears, and there is no command-name ending
  95. #        in '!' listed, then the flag does nothing, and should be
  96. #        viewed simply as documentation.
  97. #
  98. # $Header: /usr/build/vile/vile/RCS/cmdtbl,v 1.161 1998/09/07 21:42:13 cmorgan Exp $
  99. #
  100. #
  101.  
  102. abbrev        NONE|(EXRCOK|EXTRA)
  103.     "abbreviate"
  104.     "show-abbreviations"
  105.     <establish shorthand for another string, or show all abbreviations>
  106. altbuff        NONE
  107.     "alternate-buffer"        !FEWNAMES
  108.     '^^'
  109.     'CTRL+6'            W32KY    SYS_WINNT
  110.     <switch to previous buffer>
  111. append        REDO|UNDO
  112.     "append-chars"            !FEWNAMES
  113.     'a'
  114.     <insert (CNT copies of) text after the cursor>
  115. appstring    REDO|UNDO        !SMALLER
  116.     "append-string"
  117.     <append the given string after the cursor>
  118. appendeol    REDO|UNDO
  119.     "append-chars-at-eol"        !FEWNAMES
  120.     'A'
  121.     <insert (CNT copies of) text after the end of line>
  122. backchar    MOTION
  123.     "backward-character"        !FEWNAMES
  124.     <move CNT characters left, wrapping to previous line>
  125. backchar_to_bol    MOTION
  126.     "backward-character-to-bol"    !FEWNAMES
  127.     "left-arrow"
  128.     'h'
  129.     '^H'
  130.     '^?'
  131.     'FN-D'                KEY_Left
  132.     <move CNT characters left, stopping at beginning of line>
  133. backdelchar    REDO|UNDO
  134.     "delete-previous-character"    !FEWNAMES
  135.     'X'
  136.     <delete CNT characters to the left>
  137. backhunt    ABSM|MOTION        !SMALLER
  138.     "hunt-backward"
  139.     <search backward for previously entered pattern>
  140. backhpage    MOTION
  141.     "previous-half-page"        !FEWNAMES
  142.     "back-half-page"        !FEWNAMES
  143.     "up-half-page"            !FEWNAMES
  144.     '^U'
  145.     <move up CNT half screens>
  146. backline    GOAL|MOTION|FL
  147.     "previous-line"            !FEWNAMES
  148.     "back-line"            !FEWNAMES
  149.     "up-line"            !FEWNAMES
  150.     "up-arrow"            !FEWNAMES
  151.     'k'
  152.     '^P'
  153.     'FN-A'                KEY_Up
  154.     <move up CNT lines>
  155. backbline    MOTION|FL
  156.     "previous-line-at-bol"        !FEWNAMES
  157.     "back-line-at-bol"        !FEWNAMES
  158.     "up-line-at-bol"        !FEWNAMES
  159.     '-'
  160.     <move up CNT lines, to first non-white character>
  161. backpage    MOTION
  162.     "previous-page"            !FEWNAMES
  163.     "back-page"            !FEWNAMES
  164.     '^B'
  165.     'FN-p'                KEY_Prior
  166.     <move up CNT full screens>
  167. backword    MOTION
  168.     "previous-word"            !FEWNAMES
  169.     "back-word"            !FEWNAMES
  170.     'B'
  171.     <move left by CNT \"big\" words>
  172. backviword    MOTION
  173.     "previous-punctuated-word"    !FEWNAMES
  174.     "back-punctuated-word"        !FEWNAMES
  175.     'b'
  176.     <move left by CNT \"small\" words>
  177. backsearch    ABSM|MOTION
  178.     "search-reverse"        !FEWNAMES
  179.     '?'
  180.     <search backwards for fresh pattern>
  181. bcsrch        MOTION
  182.     "backward-char-scan"        !FEWNAMES
  183.     'F'
  184.     <scan left on the line for the given character>
  185. bcsrch_to    MOTION
  186.     "backward-char-scan-to"        !FEWNAMES
  187.     'T'
  188.     <scan left on the line up to but not including the given character>
  189. bindkey        NONE            OPT_REBIND
  190.     "bind-key"
  191.     "rebind-key"
  192.     <bind a keystroke to a function>
  193. bktoshell    NONE|(BANG)        OPT_SHELL
  194.     "suspend"
  195.     "suspend!"
  196.     "stop"
  197.     "stop!"
  198.     '^Z'
  199.     <suspend the editor>
  200. cd        NONE            OPT_SHELL
  201.     "cd"
  202.     "change-directory"
  203.     <move to a new directory, \"-\" is previous, \"~\" is $HOME>
  204. cntl_x_func    NONE
  205.     "cntl_x-prefix"
  206.     '^X'
  207.     <the \"Control-X\" prefix, used when typing extended commands>
  208. chgchar        REDO|UNDO
  209.     "change-char"            !FEWNAMES
  210.     "delete-char-and-insert-chars"    !FEWNAMES
  211.     's'
  212.     <insert text to replace CNT characters>
  213. chgline        REDO|UNDO
  214.     "change-line"            !FEWNAMES
  215.     "delete-line-and-insert-chars"    !FEWNAMES
  216.     'S'
  217.     <insert text to replace the current line>
  218. chgtoeol    REDO|UNDO
  219.     "change-to-eol"            !FEWNAMES
  220.     "delete-to-eol-and-insert-chars" !FEWNAMES
  221.     'C'
  222.     <insert text to replace the rest of the line>
  223. clear_match_attrs    NONE        OPT_HILITEMATCH
  224.     "clear-visual-matches"
  225.     '='
  226.     <clear highlighting caused by searches when \"visual-matches\" is set>
  227. clrmes        NONE
  228.     "clear-message-line"        !FEWNAMES
  229.     <erase text on the bottom line of screen>
  230. comp_err_exps    NONE            OPT_FINDERR
  231.     "compile-error-expressions"
  232.     <(re)compile the [Error Expressions] buffer>
  233. consearch    ABSM|MOTION
  234.     "continue-search"        !FEWNAMES
  235.     'n'
  236.     <search for previous pattern in same direction as before>
  237. wordcount    RANGE            OPT_WORDCOUNT
  238.     "count-words"
  239.     <count words, lines, and chars in the region>
  240. opercopy    OPER|(RANGE|EXTRA)
  241.     "copy-til"
  242.     "c"
  243.     <copy text in the region>
  244. opercrypt    OPER|REDO|UNDO|GLOBOK|(RANGE)    OPT_ENCRYPT
  245.     "crypt-til"
  246.     '^X-C'
  247.     <encrypt/decrypt text in the region>
  248. kbd_mac_begin    NONE
  249.     "begin-keyboard-macro"        !FEWNAMES
  250.     '^X-('
  251.     <begin recording a macro of keystrokes>
  252. kbd_mac_end    NONE
  253.     "end-keyboard-macro"        !FEWNAMES
  254.     '^X-)'
  255.     <end recording a macro of keystrokes>
  256. kbd_mac_exec    REDO|UNDO|VIEWOK
  257.     "execute-keyboard-macro"    !FEWNAMES
  258.     '^X-&'
  259.     <execute a previously recorded macro of keystrokes>
  260. kbd_mac_save    NONE
  261.     "save-keyboard-macro"
  262.     '^X-^'
  263.     <save a previously recorded macro of keystrokes to a named register>
  264. cbuf1        REDO            OPT_EXEC_MACROS>0
  265.     "execute-macro-1"        !FEWNAMES
  266.     'FN-1'                KEY_F1
  267.     'FN-P'                KEY_KP_F1
  268.     <execute [Macro 1]>
  269. cbuf2        REDO            OPT_EXEC_MACROS>1
  270.     "execute-macro-2"        !FEWNAMES
  271.     'FN-2'                KEY_F2
  272.     'FN-Q'                KEY_KP_F2
  273.     <execute [Macro 2]>
  274. cbuf3        REDO            OPT_EXEC_MACROS>2
  275.     "execute-macro-3"        !FEWNAMES
  276.     'FN-3'                KEY_F3
  277.     'FN-R'                KEY_KP_F3
  278.     <execute [Macro 3]>
  279. cbuf4        REDO            OPT_EXEC_MACROS>3
  280.     "execute-macro-4"        !FEWNAMES
  281.     'FN-4'                KEY_F4
  282.     'FN-S'                KEY_KP_F4
  283.     <execute [Macro 4]>
  284. cbuf5        REDO            OPT_EXEC_MACROS>4
  285.     "execute-macro-5"        !FEWNAMES
  286.     'FN-5'                KEY_F5
  287.     <execute [Macro 5]>
  288. cbuf6        REDO            OPT_EXEC_MACROS>5
  289.     "execute-macro-6"        !FEWNAMES
  290.     'FN-6'                KEY_F6
  291.     <execute [Macro 6]>
  292. cbuf7        REDO            OPT_EXEC_MACROS>6
  293.     "execute-macro-7"        !FEWNAMES
  294.     'FN-7'                KEY_F7
  295.     <execute [Macro 7]>
  296. cbuf8        REDO            OPT_EXEC_MACROS>7
  297.     "execute-macro-8"        !FEWNAMES
  298.     'FN-8'                KEY_F8
  299.     <execute [Macro 8]>
  300. cbuf9        REDO            OPT_EXEC_MACROS>8
  301.     "execute-macro-9"        !FEWNAMES
  302.     'FN-9'                KEY_F9
  303.     <execute [Macro 9]>
  304. cbuf10        REDO            OPT_EXEC_MACROS>9
  305.     'FN-0'                KEY_F10
  306.     "execute-macro-10"        !FEWNAMES
  307.     <execute [Macro 10]>
  308. cbuf11        REDO            OPT_EXEC_MACROS>10
  309.     "execute-macro-11"        !FEWNAMES
  310.     'FN-!'                KEY_F11
  311.     <execute [Macro 11]>
  312. cbuf12        REDO            OPT_EXEC_MACROS>11
  313.     'FN-@'                KEY_F12
  314.     "execute-macro-12"        !FEWNAMES
  315.     <execute [Macro 12]>
  316. cbuf13        REDO            OPT_EXEC_MACROS>12
  317.     'FN-#'                KEY_F13
  318.     "execute-macro-13"        !FEWNAMES
  319.     <execute [Macro 13]>
  320. cbuf14        REDO            OPT_EXEC_MACROS>13
  321.     'FN-$'                KEY_F14
  322.     "execute-macro-14"        !FEWNAMES
  323.     <execute [Macro 14]>
  324. cbuf15        REDO            OPT_EXEC_MACROS>14
  325.     'FN-%'                KEY_F15
  326.     "execute-macro-15"        !FEWNAMES
  327.     <execute [Macro 15]>
  328. cbuf16        REDO            OPT_EXEC_MACROS>15
  329.     'FN-^'                KEY_F16
  330.     "execute-macro-16"        !FEWNAMES
  331.     <execute [Macro 16]>
  332. cbuf17        REDO            OPT_EXEC_MACROS>16
  333.     'FN-&'                KEY_F17
  334.     "execute-macro-17"        !FEWNAMES
  335.     <execute [Macro 17]>
  336. cbuf18        REDO            OPT_EXEC_MACROS>17
  337.     'FN-*'                KEY_F18
  338.     "execute-macro-18"        !FEWNAMES
  339.     <execute [Macro 18]>
  340. cbuf19        REDO            OPT_EXEC_MACROS>18
  341.     'FN-('                KEY_F19
  342.     "execute-macro-19"        !FEWNAMES
  343.     <execute [Macro 19]>
  344. cbuf20        REDO            OPT_EXEC_MACROS>19
  345.     'FN-)'                KEY_F20
  346.     "execute-macro-20"        !FEWNAMES
  347.     <execute [Macro 20]>
  348. cbuf21        REDO            OPT_EXEC_MACROS>20
  349.     'FN-\241'            KEY_F21
  350.     "execute-macro-21"        !FEWNAMES
  351.     <execute [Macro 21]>
  352. cbuf22        REDO            OPT_EXEC_MACROS>21
  353.     'FN-\242'            KEY_F22
  354.     "execute-macro-22"        !FEWNAMES
  355.     <execute [Macro 22]>
  356. cbuf23        REDO            OPT_EXEC_MACROS>22
  357.     'FN-\243'            KEY_F23
  358.     "execute-macro-23"        !FEWNAMES
  359.     <execute [Macro 23]>
  360. cbuf24        REDO            OPT_EXEC_MACROS>23
  361.     'FN-\244'            KEY_F24
  362.     "execute-macro-24"        !FEWNAMES
  363.     <execute [Macro 24]>
  364. cbuf25        REDO            OPT_EXEC_MACROS>24
  365.     'FN-\245'            KEY_F25
  366.     "execute-macro-25"        !FEWNAMES
  367.     <execute [Macro 25]>
  368. cbuf26        REDO            OPT_EXEC_MACROS>25
  369.     'FN-\246'            KEY_F26
  370.     "execute-macro-26"        !FEWNAMES
  371.     <execute [Macro 26]>
  372. cbuf27        REDO            OPT_EXEC_MACROS>26
  373.     'FN-\247'            KEY_F27
  374.     "execute-macro-27"        !FEWNAMES
  375.     <execute [Macro 27]>
  376. cbuf28        REDO            OPT_EXEC_MACROS>27
  377.     'FN-\250'            KEY_F28
  378.     "execute-macro-28"        !FEWNAMES
  379.     <execute [Macro 28]>
  380. cbuf29        REDO            OPT_EXEC_MACROS>28
  381.     'FN-\251'            KEY_F29
  382.     "execute-macro-29"        !FEWNAMES
  383.     <execute [Macro 29]>
  384. cbuf30        REDO            OPT_EXEC_MACROS>29
  385.     'FN-\252'            KEY_F30
  386.     "execute-macro-30"        !FEWNAMES
  387.     <execute [Macro 30]>
  388. cbuf31        REDO            OPT_EXEC_MACROS>30
  389.     'FN-\253'            KEY_F31
  390.     "execute-macro-31"        !FEWNAMES
  391.     <execute [Macro 31]>
  392. cbuf32        REDO            OPT_EXEC_MACROS>31
  393.     'FN-\254'            KEY_F32
  394.     "execute-macro-32"        !FEWNAMES
  395.     <execute [Macro 32]>
  396. cbuf33        REDO            OPT_EXEC_MACROS>32
  397.     'FN-\255'            KEY_F33
  398.     "execute-macro-33"        !FEWNAMES
  399.     <execute [Macro 33]>
  400. cbuf34        REDO            OPT_EXEC_MACROS>33
  401.     'FN-\256'            KEY_F34
  402.     "execute-macro-34"        !FEWNAMES
  403.     <execute [Macro 34]>
  404. cbuf35        REDO            OPT_EXEC_MACROS>34
  405.     'FN-\257'            KEY_F35
  406.     "execute-macro-35"        !FEWNAMES
  407.     <execute [Macro 35]>
  408. cbuf36        REDO            OPT_EXEC_MACROS>35
  409.     "execute-macro-36"        !FEWNAMES
  410.     <execute [Macro 36]>
  411. cbuf37        REDO            OPT_EXEC_MACROS>36
  412.     "execute-macro-37"        !FEWNAMES
  413.     <execute [Macro 37]>
  414. cbuf38        REDO            OPT_EXEC_MACROS>37
  415.     "execute-macro-38"        !FEWNAMES
  416.     <execute [Macro 38]>
  417. cbuf39        REDO            OPT_EXEC_MACROS>38
  418.     "execute-macro-39"        !FEWNAMES
  419.     <execute [Macro 39]>
  420. cbuf40        REDO            OPT_EXEC_MACROS>39
  421.     "execute-macro-40"        !FEWNAMES
  422.     <execute [Macro 40]>
  423. define_mode    NONE            OPT_MAJORMODE
  424.     "define-majormode"
  425.     "define-mode"
  426.     <define a major mode, i.e., a collection of buffer modes>
  427. define_submode    NONE            OPT_MAJORMODE
  428.     "define-submode"
  429.     <define a submode within a major mode>
  430. delwind        NONE
  431.     "delete-window"            !FEWNAMES
  432.     '^K'
  433.     '^X-0'
  434.     <destroy the current window, unless it is the last one>
  435. forceblank    REDO|UNDO        OPT_AEDIT
  436.     "delete-blank-lines"        !FEWNAMES
  437.     "force-blank-lines"        !FEWNAMES
  438.     '^A-d'
  439.     <delete blank lines (or force some if CNT specified)>
  440. delglobmode    NONE
  441.     "delete-global-mode"        !FEWNAMES
  442.     "setgno"
  443.     "unsetg"
  444.     "setno"
  445.     "unset"
  446.     <turn off the global value of a mode setting>
  447. dellocmode    NONE|(EXRCOK|EXTRA)
  448.     "delete-mode"            !FEWNAMES
  449.     "setlno"
  450.     "unsetl"
  451.     <turn off the current buffer's local value of a mode setting>
  452. deltoeol    REDO|UNDO
  453.     "delete-to-eol"            !FEWNAMES
  454.     'D'
  455.     <delete text from cursor to the end of line>
  456. desbind        NONE            OPT_REBIND
  457.     "list-commands"
  458.     "describe-bindings"
  459.     "show-commands"
  460.     "show-bindings"
  461.     <show a list of all commands>
  462. desmotions    NONE            OPT_REBIND
  463.     "list-motions"
  464.     "describe-motions"
  465.     "show-motions"
  466.     <show a list of all motion commands>
  467. desopers    NONE            OPT_REBIND
  468.     "list-operators"
  469.     "describe-operators"
  470.     "show-operators"
  471.     <show a list of all operator commands>
  472. desprint    NONE            OPT_SHOW_CTYPE
  473.     "show-printable"
  474.     <show the printable characters, with types>
  475. desapro        NONE            OPT_REBIND
  476.     "apropos"
  477.     "list-commands-apropos-to"
  478.     <look up command names containing a string>
  479. desfunc        NONE            OPT_REBIND
  480.     "describe-function"
  481.     "show-function"
  482.     <show a description and current bindings for a function>
  483. deskey        NONE            OPT_REBIND
  484.     "describe-key"
  485.     <show the function bound to a given key>
  486. dotcmdplay    UNDO
  487.     "repeat-last-cmd"        !FEWNAMES
  488.     '.'
  489.     <repeat the last text-changing command>
  490. ex    NONE|(BANG|FILE1)
  491.     "ex"
  492.     <entry point to the \"exile\" editor.  unimplemented>
  493. execbuf        NONE            !SMALLER
  494.     "execute-buffer"        !FEWNAMES
  495.     <run the given buffer as a script>
  496. execfile    NONE            !SMALLER
  497.     "execute-file"            !FEWNAMES
  498.     "source"
  499.     <run the given file as a script>
  500. exechypercmd    NONE            OPT_HYPERTEXT
  501.     "execute-hypertext-command"    !FEWNAMES
  502.     <run the hypertext command attached to the region under the cursor>
  503. showhypercmd    NONE            OPT_HYPERTEXT
  504.     "show-hypertext-command"    !FEWNAMES
  505.     <show the hypertext command attached to the region under the cursor>
  506. execkreg    REDO|UNDO|VIEWOK
  507.     "execute-register"
  508.     '@'
  509.     <execute the keystroke macro stored in the given named register>
  510. execproc    REDO            OPT_PROCEDURES
  511.     "execute-procedure"        !FEWNAMES
  512.     "run"
  513.     <run the given named stored-procedure as a script>
  514. enlargewind    NONE
  515.     "grow-window"            !FEWNAMES
  516.     'V'
  517.     <increase the size of the current window by CNT lines>
  518. esc_func    NONE
  519.     "abort-command"            !FEWNAMES
  520.     '^['
  521.     <the abort key, normally bound to ESC; it terminates lots of things>
  522. flow_control_enable    NONE        SYS_UNIX
  523.     "flow-control-enable"
  524.     <enable software flow-control (disable with arg)>
  525. fcsrch        MOTION
  526.     "forward-char-scan"        !FEWNAMES
  527.     'f'
  528.     <scan right on the line for the given character>
  529. fcsrch_to    MOTION
  530.     "forward-char-scan-up-to"    !FEWNAMES
  531.     't'
  532.     <scan right on the line up to but not including the given character>
  533. filefind    NONE|(BANG|FILE1|PLUS)
  534.     "e"
  535.     "E"
  536.     "edit-file"            !FEWNAMES
  537.     "find-file"            !FEWNAMES
  538.     '^X-e'
  539.     <bring given (or under-cursor) file or existing buffer into window>
  540. fileread    NONE
  541.     "e!"
  542.     "replace-with-file"        !FEWNAMES
  543.     <replace the contents of the current buffer with the given file>
  544. filename    NONE|(NAMEDF)
  545.     "change-file-name"        !FEWNAMES
  546.     "f"
  547.     "file"
  548.     "filename"
  549.     <change the filename associated with the current buffer>
  550. filesave    NONE|BANG        !SMALLER
  551.     "save-file"
  552.     "save-file!"
  553.     <save the contents of the current buffer to its associated filename>
  554. filewrite    NONE|BANG
  555.     "write-file"            !FEWNAMES
  556.     "write-file!"            !FEWNAMES
  557.     <write the entire contents of the current buffer to its filename>
  558. vile_filter    REDO|UNDO        OPT_SHELL
  559.     "|"
  560.     "filter-buffer"            !FEWNAMES
  561.     <pipe the entire buffer through an external filter command>
  562. finderr        NONE            OPT_FINDERR
  563.     "find-next-error"        !FEWNAMES
  564.     '^X-^X'
  565.     <move to the next \"error\" in the error-buffer>
  566. finderrbuf    NONE            OPT_FINDERR
  567.     "find-next-error-buffer-name"
  568.     "error-buffer"
  569.     <set the name of the buffer used as the error-buffer>
  570. firstbuffer    NONE
  571.     "rewind"
  572.     <go to first buffer in buffer list.  (does nothing if \"autobuffer\" set>
  573. firstnonwhite    MOTION
  574.     "first-nonwhite"        !FEWNAMES
  575.     '^'
  576.     <move to the first non-whitespace character on line>
  577. fisearch    NONE            OPT_ISRCH
  578.     "incremental-search"        !FEWNAMES
  579.     '^X-S'
  580.     <search forwards for a pattern entered character by character>
  581. flipchar    REDO|UNDO
  582.     "flip-character"        !FEWNAMES
  583.     '~'
  584.     <exchange upper and lowercase for the current character>
  585. fnclabel    NONE            DISP_HP150
  586.     "label-function-key"        !FEWNAMES
  587.     "label-fkey"
  588.     <label the given function key>
  589. forwdelchar    REDO|UNDO
  590.     "delete-next-character"        !FEWNAMES
  591.     'x'
  592.     'FN-d'                KEY_Delete
  593.     <delete CNT characters to the right>
  594. forwhpage    MOTION
  595.     "forward-half-page"        !FEWNAMES
  596.     "next-half-page"        !FEWNAMES
  597.     "down-half-page"        !FEWNAMES
  598.     '^D'
  599.     <move down CNT half screens>
  600. forwchar    MOTION
  601.     "forward-character"        !FEWNAMES
  602.     "next-character"        !FEWNAMES
  603.     <move CNT characters right, wrapping to next line>
  604. forwchar_to_eol    MOTION
  605.     "forward-character-to-eol"    !FEWNAMES
  606.     "next-character-to-eol"        !FEWNAMES
  607.     "right-arrow"
  608.     ' '
  609.     'l'
  610.     'FN-C'                KEY_Right
  611.     <move CNT characters right, stopping at end of line>
  612. forwpage    MOTION
  613.     "forward-page"            !FEWNAMES
  614.     "next-page"            !FEWNAMES
  615.     "down-page"            !FEWNAMES
  616.     '^F'
  617.     'FN-n'                KEY_Next
  618.     <move down CNT full screens>
  619. forwline    GOAL|MOTION|FL
  620.     "forward-line"            !FEWNAMES
  621.     "next-line"            !FEWNAMES
  622.     "down-line"            !FEWNAMES
  623.     "down-arrow"            !FEWNAMES
  624.     'j'
  625.     '^J'
  626.     '^N'
  627.     'FN-B'                KEY_Down
  628.     <move down CNT lines>
  629. forwbline    MOTION|FL
  630.     "forward-line-at-bol"        !FEWNAMES
  631.     "next-line-at-bol"        !FEWNAMES
  632.     "down-line-at-bol"        !FEWNAMES
  633.     '+'
  634.     '^M'
  635.     <move down CNT lines, to first non-white character>
  636. forwword    MOTION
  637.     "forward-word"            !FEWNAMES
  638.     "next-word"            !FEWNAMES
  639.     'W'
  640.     <move right by CNT \"big\" words>
  641. forwviword    MOTION
  642.     "forward-punctuated-word"    !FEWNAMES
  643.     "next-punctuated-word"        !FEWNAMES
  644.     'w'
  645.     <move right by CNT \"small\" words>
  646. forwendw    MOTION
  647.     "forward-word-end"        !FEWNAMES
  648.     "next-word-end"            !FEWNAMES
  649.     'E'
  650.     <move right to the end of CNT \"big\" words>
  651. forwviendw    MOTION
  652.     "forward-punctuated-word-end"    !FEWNAMES
  653.     "next-punctuated-word-end"    !FEWNAMES
  654.     'e'
  655.     <move right to the end of CNT \"small\" words>
  656. forwhunt    ABSM|MOTION        !SMALLER
  657.     "hunt-forward"            !FEWNAMES
  658.     <search forward for previously entered pattern>
  659. forwsearch    ABSM|MOTION
  660.     "search-forward"        !FEWNAMES
  661.     '/'
  662.     'FN-f'                KEY_Find
  663.     <search forwards for fresh pattern>
  664. matchfence    ABSM|MOTION        OPT_CFENCE
  665.     "goto-matching-fence"        !FEWNAMES
  666.     '%'
  667.     <find partner for next (,),[,],{,},#if,#else,#endif,/*,*/>
  668. matchfenceback    ABSM|MOTION        OPT_CFENCE
  669.     "goto-matching-fence-behind"    !FEWNAMES
  670.     '^X-%'
  671.     <find partner for previous (,),[,],{,} on line>
  672. globals        NONE
  673.     "oglobals"            NEVER
  674.  
  675. # the gotdotplus() function is mostly for internal use only, for the
  676. # stuttered operator commands, but it corresponds to the real vi '_'
  677. # command, so we give it a name, so it can be bound to if desired.
  678. godotplus    MOTION|FL
  679.     "whole-lines"
  680.     <move CNT whole lines.  same as \"stuttering\" most operators>
  681.  
  682. # this function is for internal use only, for ex commands
  683. gomark        MOTION|FL|(RANGE|ZERO)
  684.  
  685. gotobop        ABSM|MOTION
  686.     "previous-paragraph"        !FEWNAMES
  687.     "back-paragraph"        !FEWNAMES
  688.     "up-paragraph"            !FEWNAMES
  689.     '{'
  690.     <move to the start of a paragraph>
  691. gotoeop        ABSM|MOTION
  692.     "forward-paragraph"        !FEWNAMES
  693.     "next-paragraph"        !FEWNAMES
  694.     "down-paragraph"        !FEWNAMES
  695.     '}'
  696.     <move to the end of a paragraph>
  697. gotobob        ABSM|MOTION        !SMALLER
  698.     "beginning-of-file"        !FEWNAMES
  699.     "goto-beginning-of-file"    !FEWNAMES
  700.     'FN-H'                KEY_Home
  701.     <move to the top of the buffer>
  702. gotoeob        ABSM|MOTION        !SMALLER
  703.     "goto-end-of-file"        !FEWNAMES
  704.     "end-of-file"            !FEWNAMES
  705.     'FN-E'                KEY_End
  706.     <move to the end of the buffer>
  707. gotobol        MOTION
  708.     "goto-bol"            !FEWNAMES
  709.     "beginning-of-line"        !FEWNAMES
  710.     "bol"                !FEWNAMES
  711.     '0'
  712.     <move to the very beginning of the line>
  713. gotoeol        MOTION|GOAL
  714.     "goto-eol"            !FEWNAMES
  715.     "end-of-line"            !FEWNAMES
  716.     "eol"                !FEWNAMES
  717.     '$'
  718.     <move to the very end of the line>
  719. gotobos        ABSM|MOTION|FL
  720.     "goto-beginning-of-screen"    !FEWNAMES
  721.     "beginning-of-screen"        !FEWNAMES
  722.     'H'
  723.     <move to the CNT'th line on the screen>
  724. gotomos        ABSM|MOTION|FL
  725.     "goto-middle-of-screen"        !FEWNAMES
  726.     "middle-of-screen"        !FEWNAMES
  727.     'M'
  728.     <move to the line in the middle of the screen>
  729. gotoeos        ABSM|MOTION|FL
  730.     "goto-end-of-screen"        !FEWNAMES
  731.     "end-of-screen"            !FEWNAMES
  732.     'L'
  733.     <move to the CNT'th line from the bottom of the screen>
  734. gotobosec    ABSM|MOTION
  735.     "previous-section"        !FEWNAMES
  736.     "back-section"            !FEWNAMES
  737.     "up-section"            !FEWNAMES
  738.     '['
  739.     <move to the previous start of a \"section\">
  740. gotoeosec    ABSM|MOTION
  741.     "forward-section"        !FEWNAMES
  742.     "next-section"            !FEWNAMES
  743.     "down-section"            !FEWNAMES
  744.     ']'
  745.     <move to the next start of a \"section\">
  746. gotobosent    ABSM|MOTION
  747.     "previous-sentence"        !FEWNAMES
  748.     "back-sentence"            !FEWNAMES
  749.     "up-sentence"            !FEWNAMES
  750.     '('
  751.     <move to the previous start of a \"sentence\">
  752. gotoeosent    ABSM|MOTION
  753.     "forward-sentence"        !FEWNAMES
  754.     "next-sentence"            !FEWNAMES
  755.     "down-sentence"            !FEWNAMES
  756.     ')'
  757.     <move to the next start of a \"sentence\">
  758. gototag        NONE            OPT_TAGS
  759.     "ta"
  760.     "tag"
  761.     "find-tag"            !FEWNAMES
  762.     '^]'
  763.     <look up the given (or under-cursor) name as a \"tag\">
  764. gotocol        MOTION
  765.     "goto-column"            !FEWNAMES
  766.     '|'
  767.     <go to the CNT'th column on the line>
  768. gotoline    ABSM|MOTION|FL|(RANGE)
  769.     "goto-line"            !FEWNAMES
  770.     'G'
  771.     <go to the CNT'th line.  unspecified CNT means end of buffer>
  772. # golinenmmark and goexactnmmark are special cases--
  773. #     no ABSM even though they are absolute, since these are the commands
  774. #    that use the last-dot-mark
  775. golinenmmark    MOTION|FL
  776.     "goto-named-mark"        !FEWNAMES
  777. #  single quote -- can't use '''
  778.     '\047'
  779.     <move to line containing the mark, at first non-white character>
  780. goexactnmmark    MOTION
  781.     "goto-named-mark-exact"        !FEWNAMES
  782.     '`'
  783.     <move to the given mark>
  784. gorectnmmark    MOTION|RECT
  785.     "goto-named-mark-rectangular"    !FEWNAMES
  786.     '\0134'
  787.     <move to the mark, implying a rectangle if used with an operator>
  788. help        NONE
  789.     "h"
  790.     "help"
  791.     "list-help"
  792.     "show-help"
  793.     '^A-h'
  794.     '^X-h'
  795.     'FN-?'                KEY_Help
  796.     'FN-m'                KEY_Menu
  797.     <bring up a buffer containing lots of barely sorted information>
  798. histbuff    NONE
  799.     "historical-buffer"        !FEWNAMES
  800.     "_"
  801.     '_'
  802.     <visit the CNT'th previous buffer>
  803. insert        REDO|UNDO
  804.     "insert-chars"            !FEWNAMES
  805.     'FN-i'                KEY_Insert
  806.     'i'
  807.     <insert (CNT copies of) text before the cursor>
  808. insert_no_aindent    REDO|UNDO
  809.     "insert-chars-no-autoindent"    !FEWNAMES
  810.     '^A-i'
  811.     <insert (CNT copies of) text before the cursor, suppressing autoindent>
  812. insertbol    REDO|UNDO
  813.     "insert-chars-at-bol"    !FEWNAMES
  814.     'I'
  815.     <insert (CNT copies of) text before the first non-white char on line>
  816. insfile        REDO|UNDO|GLOBOK|(FROM|ZERO|NAMEDF)
  817.     "r"
  818.     "insert-file"            !FEWNAMES
  819.     "read-file"            !FEWNAMES
  820.     '^R'
  821.     <read the given file into the current buffer at the current line>
  822. insspace    REDO|UNDO        !SMALLER
  823.     "insert-space"            !FEWNAMES
  824.     <insert a space character at the cursor>
  825. insstring    REDO|UNDO        !SMALLER
  826.     "insert-string"
  827.     <insert the given string at the cursor>
  828. joinlines    REDO|UNDO
  829.     "join-lines"            !FEWNAMES
  830.     'J'
  831.     <join CNT lines together with the current one>
  832. killbuffer    GOAL
  833.     "delete-buffer"            !FEWNAMES
  834.     "kill-buffer"            !FEWNAMES
  835.     "ki"
  836.     '^X-k'
  837.     <eliminate the given or under-cursor buffer>
  838. showlength    DFLALL|FROM|TO|NOMOVE
  839.     "buffer-length"            !FEWNAMES
  840.     "="
  841.     <report number of lines in current buffer>
  842. lastnonwhite    MOTION            !SMALLER
  843.     "last-nonwhite"            !FEWNAMES
  844.     <move to the last non-whitespace character on line>
  845. listbuffers    NONE
  846.     "list-buffers"            !FEWNAMES
  847.     "show-buffers"            !FEWNAMES
  848.     "args"
  849.     '^A-*'
  850.     <show the current list of buffers.  give CNT to force showing all>
  851. showhistory    NONE            OPT_HISTORY
  852.     "show-history"
  853.     <show the command history>
  854. lineputafter    REDO|UNDO|GLOBOK|(FROM|ZERO|OPTREG)
  855.     "put-as-lines-after"        !FEWNAMES
  856.     "put"
  857.     '^X-p'
  858.     <insert from (un)named register, as whole lines, after current line>
  859. lineputbefore    REDO|UNDO|GLOBOK|(FROM|OPTREG)
  860.     "put-as-lines-before"        !FEWNAMES
  861.     "Put"
  862.     '^X-P'
  863.     <insert from (un)named register, as whole lines, before current line>
  864. rectputafter    REDO|UNDO|GLOBOK|(FROM|ZERO|OPTREG)
  865.     "put-as-rectangle-after"    !FEWNAMES
  866.     "rput"
  867.     '^A-p'
  868.     <insert from (un)named register, as a rectangle, after cursor>
  869. rectputbefore    REDO|UNDO|GLOBOK|(FROM|OPTREG)
  870.     "put-as-rectangle-before"    !FEWNAMES
  871.     "rPut"
  872.     '^A-P'
  873.     <insert from (un)named register, as a rectangle, in front of cursor>
  874. lineundo    NONE
  875.     "undo-line-changes"        !FEWNAMES
  876.     'U'
  877.     <undo all changes made to most recently altered line>
  878. loadkreg    NONE
  879.     "load-register"
  880.     <load the given string into the given named register>
  881. showkreg    NONE            OPT_SHOW_REGS
  882.     "show-registers"
  883.     "showregisters"            !FEWNAMES
  884.     "list-registers"        !FEWNAMES
  885.     <show the contents of all of the named and unnamed registers>
  886. sysmap        NONE|(EXRCOK|EXTRA)    OPT_SHOW_MAPS
  887.     "show-system-mapped-chars"
  888.     <list the system function-key maps>
  889. map        NONE|(EXRCOK|EXTRA)
  890.     "map"
  891.     "show-mapped-chars"
  892.     <create a new map, or show list of the current command-mode maps>
  893. map_bang    NONE|(EXRCOK|EXTRA)
  894.     "map!"
  895.     "show-mapped!-chars"
  896.     <create a new map, or show list of the current insert-mode maps>
  897. nexttag        NONE            OPT_TAGS
  898.     "next-tag"            !FEWNAMES
  899.     '^A-^]'
  900.     <search the tags file(s) for another location for the last tag>
  901. newprocessgroup    NONE
  902.     "new-process-group"
  903.     <put editor into its own process group (X11 version only)>
  904. noremap        NONE|(EXRCOK|EXTRA)
  905.     "noremap"
  906.     <create a new unremappable command-mode map>
  907. noremap_bang    NONE|(EXRCOK|EXTRA)
  908.     "noremap!"
  909.     <create a new unremappable insert-mode map>
  910. cntl_a_func        NONE
  911.     "cntl_a-prefix"
  912.     '^A'
  913.     <the \"Control-A\" prefix, used when typing extended commands>
  914. mvdnnxtwind    NONE
  915.     "move-next-window-down"        !FEWNAMES
  916.     '^A-^E'
  917.     <move next window down (or buffer up) by CNT lines>
  918. mvupnxtwind    NONE
  919.     "move-next-window-up"        !FEWNAMES
  920.     '^A-^Y'
  921.     <move next window up (or buffer down) by CNT lines>
  922. mvdnwind    GOAL
  923.     "move-window-down"        !FEWNAMES
  924.     '^E'
  925.     <move window down (or buffer up) by CNT lines>
  926. mvupwind    GOAL
  927.     "move-window-up"        !FEWNAMES
  928.     '^Y'
  929.     <move window up (or buffer down) by CNT lines>
  930. mvrightwind    GOAL
  931.     "move-window-right"        !FEWNAMES
  932.     '^X-^R'
  933.     <scroll window to right by CNT columns, half screen if CNT unspecified>
  934. mvleftwind    GOAL
  935.     "move-window-left"        !FEWNAMES
  936.     '^X-^L'
  937.     <scroll window to left by CNT columns, half screen if CNT unspecified>
  938. nextbuffer    NONE|(BANG|NAMEDFS)
  939.     "n"
  940.     "n!"
  941.     "next-buffer"            !FEWNAMES
  942.     <switch to next buffer (or the least-recently-visited, if \"autobuffer\" on>
  943. namebuffer    NONE
  944.     "rename-buffer"
  945.     <give the current buffer a new name>
  946. newline        REDO|UNDO        !SMALLER
  947.     "newline"
  948.     <insert a newline at the cursor>
  949. newlength    NONE
  950.     "screen-rows"
  951.     <tell the editor the screen has CNT rows>
  952. newwidth    NONE
  953.     "screen-columns"
  954.     <tell the editor the screen has CNT columns>
  955. nextwind    NONE
  956.     "next-window"            !FEWNAMES
  957.     '^X-o'
  958.     <move to the next window>
  959. nullproc    NONE
  960.     "nop"                !FEWNAMES
  961.     "do-nothing"            !FEWNAMES
  962.     '^Q'
  963.     <do nothing>
  964. namedcmd    NONE
  965.     "execute-named-command"        !FEWNAMES
  966.     ":"
  967.     ':'
  968.     <execute the given function, by name>
  969. openup        REDO|UNDO|(FROM)
  970.     "open-line-above-and-insert-chars"    !FEWNAMES
  971.     "i"
  972.     'O'
  973.     <insert text in CNT fresh blank line(s), before current line>
  974. openup_no_aindent    REDO|UNDO|(FROM|ZERO)
  975.     "open-line-above-no-autoindent"    !FEWNAMES
  976.     '^A-O'
  977.     <insert text in CNT fresh blank line(s), before current, no autoindent>
  978. opendown    REDO|UNDO|(FROM|ZERO)
  979.     "open-line-below-and-append-chars"    !FEWNAMES
  980.     "a"
  981.     'o'
  982.     <insert text in CNT fresh blank line(s), after current line>
  983. opendown_no_aindent    REDO|UNDO|(FROM|ZERO)
  984.     "open-line-below-no-autoindent"    !FEWNAMES
  985.     '^A-o'
  986.     <insert text in CNT fresh blank line(s), after current, no autoindent>
  987. operopenrect    OPER|REDO|UNDO|GLOBOK|UNDO|(RANGE)
  988.     "open-rectangle"
  989.     '^A-r'
  990.     <open blank rectangular area specified by given motion>
  991. operattrbold    OPER|GLOBOK|RANGE    OPT_SELECTIONS
  992.     "attribute-bold-til"        !FEWNAMES
  993.     '^A-B'
  994.     <display text as bold in the region>
  995. operattrcaseq    REDO|UNDO|OPER|GLOBOK|RANGE    OPT_SELECTIONS
  996.     "attribute-cntl_a-sequences-til"    !FEWNAMES
  997.     '^A-A'
  998.     <display text as given by ^A sequences in the region>
  999. operattrhc    OPER|GLOBOK|RANGE    OPT_HYPERTEXT
  1000.     "attribute-hypertext-til"    !FEWNAMES
  1001.     '^A-H'
  1002.     <attach hypertext command to region>
  1003. operattrital    OPER|GLOBOK|RANGE    OPT_SELECTIONS
  1004.     "attribute-italic-til"        !FEWNAMES
  1005.     '^A-I'
  1006.     <display text in italics in the region>
  1007. operattrno    OPER|GLOBOK|RANGE    OPT_SELECTIONS
  1008.     "attribute-normal-til"        !FEWNAMES
  1009.     '^A-N'
  1010.     <display text normally in the region>
  1011. operattrrev    OPER|GLOBOK|RANGE    OPT_SELECTIONS
  1012.     "attribute-reverse-til"        !FEWNAMES
  1013.     '^A-R'
  1014.     <display text reversed in the region>
  1015. operattrul    OPER|GLOBOK|RANGE    OPT_SELECTIONS
  1016.     "attribute-underline-til"    !FEWNAMES
  1017.     '^A-U'
  1018.     <display text underlined in the region>
  1019. operchg        OPER|REDO|UNDO
  1020.     "change-til"            !FEWNAMES
  1021.     "delete-and-insert-chars-til"    !FEWNAMES
  1022.     'c'
  1023.     <insert text, replacing that in the region>
  1024. operdetab    OPER|REDO|UNDO|GLOBOK|(RANGE)    OPT_AEDIT
  1025.     "detab-lines-til"        !FEWNAMES
  1026.     '^A- '
  1027.     <convert tabs to spaces in the region>
  1028. operentab    OPER|REDO|UNDO|GLOBOK|(RANGE)    OPT_AEDIT
  1029.     "entab-lines-til"        !FEWNAMES
  1030.     '^A-^I'
  1031.     <convert spaces to tabs where possible in the region>
  1032. opermove    OPER|(RANGE|EXTRA)
  1033.     "move-til"
  1034.     "m"
  1035.     <move text in the region to the given line>
  1036. operlinechg    OPER|REDO|UNDO|(RANGE)
  1037.     "change-lines-til"        !FEWNAMES
  1038.     "delete-lines-and-insert-chars-til"    !FEWNAMES
  1039.     "ch"
  1040.     '^X-c'
  1041.     <insert text, replacing that on the lines covered by the region>
  1042. operdel        OPER|REDO|UNDO
  1043.     "delete-til"            !FEWNAMES
  1044.     'd'
  1045.     <delete text in the region>
  1046. operjoin    OPER|REDO|UNDO|GLOBOK|RANGE
  1047.     "j"
  1048.     "join-lines-til"        !FEWNAMES
  1049.     <join together lines in the region>
  1050. operlinedel    OPER|REDO|UNDO|GLOBOK|(RANGE|OPTREG)
  1051.     "delete-lines-til"        !FEWNAMES
  1052.     "d"
  1053.     '^X-d'
  1054.     <delete lines covered by the region>
  1055. operfilter    OPER|REDO|UNDO|(EXRCOK|RANGE|NAMEDFS|DFLNONE|VI_NL) OPT_SHELL
  1056.     "filter-til"            !FEWNAMES
  1057.     "!"
  1058.     '!'
  1059.     <pipe the text in the region through an external filter command>
  1060. operformat    OPER|REDO|UNDO|(RANGE)    OPT_FORMAT
  1061.     "format-til"            !FEWNAMES
  1062.     '^A-f'
  1063.     '^A-j'
  1064.     <format (rejustify) the text in the region>
  1065. operflip    OPER|REDO|UNDO|GLOBOK|(RANGE)
  1066.     "flip-til"            !FEWNAMES
  1067.     "~"
  1068.     '^A-~'
  1069.     <exchange upper and lowercase on characters in the region>
  1070. # RANGE commented out, since it's not done....
  1071. operglobals    (/*RANGE|*/BANG|EXTRA|DFLALL)
  1072.     "global"
  1073.     "g"
  1074.     <perform command on all lines containing the given pattern>
  1075. opervglobals    (/*RANGE|*/BANG|EXTRA|DFLALL)
  1076.     "inverse-global"
  1077.     "vglobal"
  1078.     "v"
  1079.     <perform command on all lines not containing the given pattern>
  1080. operlower    OPER|REDO|UNDO|GLOBOK|(RANGE)
  1081.     "lower-til"            !FEWNAMES
  1082.     "L"
  1083.     '^A-l'
  1084.     <convert to lowercase all characters in the region>
  1085. operlist    OPER|GLOBOK|(RANGE)
  1086.     "list-lines-til"        !FEWNAMES
  1087.     "l"
  1088.     <show lines, making tabs and newlines visible>
  1089. operprint    OPER|GLOBOK|(RANGE)
  1090.     "print-lines-til"        !FEWNAMES
  1091.     "p"
  1092.     <show lines>
  1093. operpprint    OPER|GLOBOK|(RANGE)
  1094.     "print-prefixed-lines-til"    !FEWNAMES
  1095.     "pp"
  1096.     <show lines with line numbers>
  1097. operselect    OPER|GLOBOK|(RANGE)    OPT_SELECTIONS
  1098.     "select-til"            !FEWNAMES
  1099.     '^A-s'
  1100.     <select (and yank) the text in the region>
  1101. operupper    OPER|REDO|UNDO|GLOBOK|(RANGE)
  1102.     "upper-til"            !FEWNAMES
  1103.     "U"
  1104.     '^A-u'
  1105.     <convert to uppercase all characters in the region>
  1106. operlshift    OPER|REDO|UNDO|GLOBOK|(RANGE)
  1107.     "shift-left-til"        !FEWNAMES
  1108.     "<"
  1109.     '<'
  1110.     <shift lines in the region left by one \"shiftwidth\">
  1111. operrshift    OPER|REDO|UNDO|GLOBOK|(RANGE)
  1112.     "shift-right-til"        !FEWNAMES
  1113.     ">"
  1114.     '>'
  1115.     <shift lines in the region right by one \"shiftwidth\">
  1116. opersubst    OPER|REDO|UNDO|GLOBOK|(RANGE|EXTRA)
  1117.     "substitute-til"        !FEWNAMES
  1118.     "s"
  1119.     '^X-s'
  1120.     <perform a text substitution over the region>
  1121. opertrim    REDO|UNDO|GLOBOK|UNDO|(RANGE)    OPT_AEDIT
  1122.     "trim-lines-til"        !FEWNAMES
  1123.     "trim"
  1124.     '^A-t'
  1125.     <trim trailing whitespace from lines in the region>
  1126. operblank       REDO|UNDO|GLOBOK|UNDO|(RANGE)   OPT_AEDIT
  1127.     "blank-region"
  1128.     "blank"
  1129.     '^A-b'
  1130.     <replace the region with whitespace>
  1131. operyank    OPER
  1132.     "yank-til"            !FEWNAMES
  1133.     'y'
  1134.     <get the region into the given named or unnamed register>
  1135. operlineyank    OPER|(RANGE|OPTREG|NOMOVE)
  1136.     "yank-lines-til"        !FEWNAMES
  1137.     "y"
  1138.     '^X-y'
  1139.     <get lines covered by region into given named or unnamed register>
  1140. opersubstagain    OPER|REDO|UNDO|GLOBOK|(RANGE|EXTRA)
  1141.     "substitute-again-til"        !FEWNAMES
  1142.     "&"
  1143.     '^A-&'
  1144.     <redo the previous text substitution over the region>
  1145. opertransf    OPER|(RANGE|EXTRA)
  1146.     "transfer-til"
  1147.     "t"
  1148.     <copy text in the region>
  1149. operwrite    OPER|(RANGE|BANG|FILE1|DFLALL|NOMOVE)
  1150.     "w"
  1151.     "w!"
  1152.     "W"
  1153.     "write-til"            !FEWNAMES
  1154.     '^W'
  1155.     <write from region to the given file.  whole buffer by default>
  1156. overwritechars    REDO|UNDO
  1157.     "overwrite-chars"        !FEWNAMES
  1158.     'R'
  1159.     <replace text while inserting, character by character>
  1160. overwstring    REDO|UNDO        !SMALLER
  1161.     "overwrite-string"
  1162.     <replace text at the cursor by the given string>
  1163. onlywind    NONE
  1164.     "delete-other-windows"        !FEWNAMES
  1165.     '^O'
  1166.     '^X-1'
  1167.     <eliminate all windows except the current>
  1168. perl        OPER|REDO|UNDO|GLOBOK|RANGE|DFLNONE|VIEWOK    OPT_PERL
  1169.     "perl"
  1170.     <run a perl command>
  1171. perldo        OPER|REDO|UNDO|GLOBOK|RANGE|EXTRA        OPT_PERL
  1172.     "perldo"
  1173.     <run a perl command on each line in a range>
  1174. poswind        NONE
  1175.     "position-window"        !FEWNAMES
  1176.     'z'
  1177.     <reframe with cursor at center (.,M,m), top (CR,H,t), or bottom (-,L,b)>
  1178. prevbuffer    NONE|(BANG|NAMEDFS)    !SMALLER
  1179.     "P"
  1180.     "previous-buffer"        !FEWNAMES
  1181.     <switch to previous buffer (or the most-recently-visited, if \"autobuffer\" on>
  1182. prevwind    NONE
  1183.     "previous-window"        !FEWNAMES
  1184.     '^X-O'
  1185.     <move to the previous window>
  1186. pipecmd        NONE            OPT_SHELL
  1187.     "pipe-command"            !FEWNAMES
  1188.     "capture-command"        !FEWNAMES
  1189.     '^X-!'
  1190.     <run a command, capturing its output in the [Output] buffer>
  1191. putafter    REDO|UNDO
  1192.     "put-after"            !FEWNAMES
  1193.     'p'
  1194.     <insert CNT copies of (un)named register, after cursor>
  1195. putbefore    REDO|UNDO
  1196.     "put-before"            !FEWNAMES
  1197.     'P'
  1198.     <insert CNT copies of (un)named register, before cursor>
  1199. pwd        NONE            OPT_SHELL
  1200.     "pwd"
  1201.     "print-directory"
  1202.     <show current directory name>
  1203. quit        NONE|(BANG)
  1204.     "q"
  1205.     "Q"
  1206.     "exit"
  1207.     "quit"
  1208.     'Q'
  1209.     '^X-^C'
  1210.     <leave the editor, if there are no modified buffers>
  1211. quithard    NONE
  1212.     "quit-without-save"
  1213.     "q!"
  1214.     "Q!"
  1215.     <leave the editor, regardless of modified buffers>
  1216. quickexit    NONE|(BANG|VI_NL)
  1217.     "x"
  1218.     "x!"
  1219.     "xit"
  1220.     "wwq"
  1221.     "write-changed-buffers-and-quit" !FEWNAMES
  1222.     "quick-exit"            !FEWNAMES
  1223.     <leave the editor, writing modified buffers as needed>
  1224. quote        REDO|UNDO
  1225.     "quote-next-character"        !FEWNAMES
  1226.     <insert the next character literally, CNT times>
  1227. vile_refresh    NONE
  1228.     "clear-and-redraw"        !FEWNAMES
  1229.     '^L'
  1230.     <redraw the screen>
  1231. remove_mode    NONE            OPT_MAJORMODE
  1232.     "remove-majormode"
  1233.     "remove-mode"
  1234.     <delete the definition of a major mode>
  1235. remove_submode    NONE            OPT_MAJORMODE
  1236.     "remove-submode"
  1237.     <delete the special definition of a submode from a major mode>
  1238. reposition    NONE            !SMALLER
  1239.     "redraw-display"
  1240.     <redraw, cursor at center, or CNT'th line, or CNT'th from end if neg>
  1241. rep_csrch    MOTION
  1242.     "repeat-char-scan"        !FEWNAMES
  1243.     ';'
  1244.     <repeat the last forward character scan>
  1245. replacechar    REDO|UNDO
  1246.     "replace-character"        !FEWNAMES
  1247.     'r'
  1248.     <replace CNT characters at the cursor with the given character>
  1249. respawn        NONE            OPT_SHELL
  1250.     "!!"
  1251.     "rerun-shell-command"        !FEWNAMES
  1252.     <rerun the previously entered shell command>
  1253. resize        NONE            !SMALLER
  1254.     "resize-window"
  1255.     <change the current window to CNT lines>
  1256. restwnd        NONE            !SMALLER
  1257.     "restore-window"
  1258.     <return to window saved with \"save-window\">
  1259. rev_csrch    MOTION
  1260.     "reverse-char-scan"        !FEWNAMES
  1261.     ','
  1262.     <repeat the last backward character scan>
  1263. risearch    NONE            OPT_ISRCH
  1264.     "reverse-incremental-search"    !FEWNAMES
  1265.     '^X-R'
  1266.     <search backwards for a pattern entered character by character>
  1267. revsearch    ABSM|MOTION
  1268.     "reverse-search"        !FEWNAMES
  1269.     'N'
  1270.     <search for previous pattern in opposite direction from before>
  1271. sel_motion    ABSM|MOTION        OPT_SELECTIONS
  1272.     "selection"
  1273.     '^S'
  1274.     '^A-S'
  1275.     <move to selection.  if used with operator, region is the selection>
  1276. scrforwsearch    ABSM|MOTION
  1277.     "screen-search-forward"        !FEWNAMES
  1278.     '^X-/'
  1279.     <search forwards for pattern (word) under cursor>
  1280. scrbacksearch    ABSM|MOTION
  1281.     "screen-search-reverse"        !FEWNAMES
  1282.     '^X-?'
  1283.     <search backwards for pattern (word) under cursor>
  1284. scrsearchpat    NONE
  1285.     "screen-search-pattern-grab"    !FEWNAMES
  1286.     '^A-/'
  1287.     <set search pattern to word under cursor>
  1288. set_dosmode    NONE            OPT_DOSFILES
  1289.     "set-dos-mode"
  1290.     <force a \"dos\"-style buffer: trim CR characters, and set \"dos-mode\">
  1291. set_unixmode    NONE            OPT_DOSFILES
  1292.     "set-unix-mode"
  1293.     <force a \"unix\"-style buffer: trim CR characters, and unset \"dos-mode\">
  1294. settab        NONE
  1295.     "handle-tab"            !FEWNAMES
  1296.     "set-tab"
  1297.     '^X-t'
  1298.     <set the tabstop setting to CNT.  same as \"set tabstop=NN\">
  1299. set_termchrs    NONE            OPT_REBIND&&OPT_TERMCHRS
  1300.     "set-terminal"
  1301.     <change the value of a terminal special character>
  1302. show_termchrs    NONE            OPT_REBIND&&OPT_TERMCHRS
  1303.     "show-terminal-chars"
  1304.     <show the values of the terminal special characters>
  1305. spawncli    NONE            OPT_SHELL
  1306.     "sh"
  1307.     "shell"
  1308.     "interactive-shell"        !FEWNAMES
  1309.     <start a sub-shell in which to run commands>
  1310. savewnd        NONE            !SMALLER
  1311.     "save-window"
  1312.     <mark a window for later return with \"restore-window\">
  1313. scrnextup    NONE
  1314.     "scroll-next-window-up"        !FEWNAMES
  1315.     '^A-^U'
  1316.     <move next window up by CNT half screens>
  1317. scrnextdw    NONE
  1318.     "scroll-next-window-down"    !FEWNAMES
  1319.     '^A-^D'
  1320.     <move next window down by CNT half screens>
  1321. setfillcol    NONE
  1322.     "set-fill-column"
  1323.     '^X-f'
  1324.     <set the fillcol setting to CNT.  same as \"set fillcol=NN\">
  1325. multimotion        MOTION        OPT_SELECTIONS
  1326.     "quoted-motion"            !FEWNAMES
  1327.     'q'
  1328.     'FN-s'                KEY_Select
  1329.     <start (and end) a selection using multiple motions, CNT is type (1) >
  1330. multimotionfullline        MOTION    OPT_SELECTIONS
  1331.     "quoted-fullline-motion"    !FEWNAMES
  1332.     <start (and end) a full-line selection using multiple motions (2) >
  1333. multimotionrectangle        MOTION    OPT_SELECTIONS
  1334.     "quoted-rectangular-motion"    !FEWNAMES
  1335.     '^A-q'
  1336.     <start (and end) a rectangular selection using multiple motions (3) >
  1337. ue_setkey    NONE            OPT_ENCRYPT
  1338.     "set-crypt-key"
  1339.     '^X-X'
  1340.     <set the encryption key on the current buffer>
  1341. setlocmode    NONE|(EXRCOK|EXTRA)
  1342.     "setl"
  1343.     "set-mode"            !FEWNAMES
  1344.     <change the current buffer's local value of a mode setting>
  1345. setglobmode    NONE
  1346.     "se"
  1347.     "set"
  1348.     "setg"
  1349.     "set-global-mode"
  1350.     <change the global value of a mode setting>
  1351. setnmmark    NONE|(FROM|EXTRA|NOMOVE)
  1352.     "set-named-mark"        !FEWNAMES
  1353.     "k"
  1354.     'm'
  1355.     <set the given named mark to the current cursor location>
  1356. setvar        NONE            OPT_EVAL
  1357.     "setv"
  1358.     "set-variable"
  1359.     <set the given vile variable to a value>
  1360. showcpos    NONE
  1361.     "position"            !FEWNAMES
  1362.     '^G'
  1363.     '^X-='
  1364.     <report information about current buffer and character>
  1365. listmodes    NONE
  1366.     "modes"
  1367.     "show-modes"
  1368.     "list-modes"
  1369.     "setall"
  1370.     "setgall"
  1371.     "gmodes"
  1372.     "show-global-modes"
  1373.     "showmodes"
  1374.     "showgmodes"
  1375.     <report values of all mode settings>
  1376. list_majormodes    NONE            OPT_MAJORMODE
  1377.     "list-majormodes"        !FEWNAMES
  1378.     "show-majormodes"
  1379.     <report values of all majormode settings (use CNT for verbose listing)>
  1380. listvars    NONE            OPT_SHOW_EVAL
  1381.     "list-variables"        !FEWNAMES
  1382.     "show-variables"
  1383.     "showvars"            !FEWNAMES
  1384.     <report values of all variables, built-in and user>
  1385. showversion    NONE|(EXRCOK)
  1386.     "version"
  1387.     <report version information for the editor>
  1388. showmemory    NONE            SYS_MSDOS&&(CC_TURBO||CC_WATCOM||CC_DJGPP)
  1389.     "memory"
  1390.     <report on available memory>
  1391. showtagstack    NONE            OPT_SHOW_TAGS
  1392.     "tags"                !FEWNAMES
  1393.     "tagstack"
  1394.     "show-tagstack"
  1395.     <show the stack of successive tag references>
  1396. shrinkwind    NONE
  1397.     "shrink-window"            !FEWNAMES
  1398.     'v'
  1399.     <decrease the size of the current window by CNT lines>
  1400. source        NONE|(EXRCOK|NAMEDF)
  1401.     "exsource"
  1402.     <source a file of ex commands>
  1403. spawn        NONE            OPT_SHELL
  1404.     "shell-command"            !FEWNAMES
  1405.     <run a shell command>
  1406. poundc_func    NONE
  1407.     "function-prefix"
  1408.     '#'
  1409.     <prefix used to represent commands normally bound to function keys>
  1410. splitwind    NONE
  1411.     "split-current-window"        !FEWNAMES
  1412.     '^X-2'
  1413.     <split the window in half; CNT of 1 or 2 chooses which becomes current>
  1414. storemac    NONE
  1415.     "store-macro"
  1416.     <store script text into CNT'th macro, up to line starting with ~endm>
  1417. storeproc    NONE            OPT_PROCEDURES
  1418.     "store-procedure"
  1419.     <store script text into given named stored-procedure>
  1420. subst_again    REDO|UNDO|GLOBOK
  1421.     "substitute-again"        !FEWNAMES
  1422.     '&'
  1423.     <redo the previous text substitution>
  1424. togglelistbuffers    NONE
  1425.     "*"
  1426.     "toggle-buffer-list"        !FEWNAMES
  1427.     '*'
  1428.     <show or hide the buffer list. give CNT to force showing all>
  1429. twiddle        REDO|UNDO        !SMALLER
  1430.     "transpose-characters"        !FEWNAMES
  1431.     <exchange the two characters under and to the left of the cursor>
  1432. unbindkey    NONE            OPT_REBIND
  1433.     "unbind-key"
  1434.     <break the binding between a keystroke and a function>
  1435. undo        NONE
  1436.     "undo-change"            !FEWNAMES
  1437.     'u'
  1438.     <undo the last change made to a buffer;  repeat to reapply the change>
  1439. inf_undo    NONE
  1440.     "repeat-undo-change"            !FEWNAMES
  1441.     <undo/redo more changes, continuing in \"direction\" of last undo/redo>
  1442. backundo    NONE
  1443.     "undo-changes-backward"        !FEWNAMES
  1444.     '^X-u'
  1445.     <undo changes made to a buffer;  repeat to undo previous changes>
  1446. forwredo    NONE
  1447.     "redo-changes-forward"        !FEWNAMES
  1448.     '^X-r'
  1449.     <redo changes made to a buffer, after they have been undone>
  1450. unabbr        NONE|(EXRCOK|BANG|EXTRA)
  1451.     "unabbreviate"
  1452.     <delete an abbreviation>
  1453. unarg_func        NONE
  1454.     "universal-argument"        !FEWNAMES
  1455.     'K'
  1456.     <supply a numeric CNT to a command. sets CNT to 4, 16, 64, 256, etc.>
  1457. unimpl        NONE
  1458.     "unimplemented-command"        !FEWNAMES
  1459.     <place holder for the todo list>
  1460. unmark        NONE
  1461.     "unmark-buffer"
  1462.     <clear the \"modified\" status of a buffer>
  1463. unmap        NONE|(EXRCOK|BANG|EXTRA)
  1464.     "unmap"
  1465.     <delete a command-mode mapping>
  1466. unmap_bang    NONE|(EXRCOK|EXTRA)
  1467.     "unmap!"
  1468.     <delete an insert-mode mapping>
  1469. unmap_system    NONE|(EXRCOK|EXTRA)
  1470.     "unmap-system-chars"
  1471.     <delete a system function-key mapping>
  1472. untagpop    NONE            OPT_TAGS
  1473.     "tag-pop"            !FEWNAMES
  1474.     "pop"
  1475.     '^X-^]'
  1476.     '^T'
  1477.     <restore cursor and buffer to location before last tag lookup>
  1478. upscreen    NONE            !SMALLER
  1479.     "update-screen"
  1480.     <force the screen to be updated; flushes all pending output>
  1481. usebuffer    NONE
  1482.     "b"
  1483.     "buffer"
  1484.     "select-buffer"            !FEWNAMES
  1485.     <switch to the given buffer; will not look for a file by that name>
  1486. usekreg        REDO
  1487.     "use-register"            !FEWNAMES
  1488.     '"'
  1489.     <name a register, for use with a following command which references it>
  1490. userbeep    NONE            !SMALLER
  1491.     "beep"
  1492.     <force the terminal to ring (or flash, if \"set flash\" is active)>
  1493. visual        NONE
  1494.     "visual"
  1495.     <switch from non-existent exile mode back to visual mode.  unimplemented>
  1496. vglobals    NONE
  1497.     "ovglobals"            NEVER
  1498. viewfile    NONE
  1499.     "view-file"
  1500.     <bring given file or existing buffer into window, mark it \"view-only\">
  1501. waitfile    NONE             SYS_WINNT&&defined(VILE_OLE)
  1502.     "wait-file"
  1503.     <wait for file to grow larger than 0 bytes, timeout specified as arg>
  1504. writeallchanged    NONE|(VI_NL)
  1505.     "ww"
  1506.     "write-changed-buffers"        !FEWNAMES
  1507.     <attempt to write any buffers which are marked \"modified\">
  1508. writequit    NONE|(VI_NL)
  1509.     "wq"
  1510.     "Wq"
  1511.     "WQ"
  1512.     "write-file-and-quit"        !FEWNAMES
  1513.     <write the current buffer, and quit if no other buffers are modified>
  1514. wrapword    REDO|UNDO        !SMALLER
  1515.     "wrap-word"
  1516.     <split line in two at first preceding word break>
  1517. writemsg    NONE            !SMALLER
  1518.     "write-message"
  1519.     <put a message on the message line>
  1520. yankline    NONE
  1521.     "yank-line"            !FEWNAMES
  1522.     'Y'
  1523.     <get the current line into the given named or unnamed register>
  1524. mouse_motion    ABSM|MOTION        OPT_XTERM||DISP_X11
  1525.     'FN-M'                KEY_Mouse
  1526.     <dummy command to support mouse movements internally>
  1527. copy_to_clipboard NONE             DISP_X11
  1528.     "copy-to-clipboard"
  1529.     <copies the currently highlighted selection to the cut buffer>
  1530. paste_from_clipboard REDO|UNDO         DISP_X11
  1531.     "paste-from-clipboard"
  1532.     <pastes the contents of the cut buffer>
  1533. xterm_mouse_t    NONE            (OPT_XTERM>=3)
  1534.     'FN-t'                KEY_text
  1535.     <dummy command to support xterm mouse operation>
  1536. xterm_mouse_T    NONE            (OPT_XTERM>=3)
  1537.     'FN-T'                KEY_textInvalid
  1538.     <dummy command to support xterm mouse operation>
  1539. zzquit        NONE|(BANG|VI_NL)
  1540.     'Z'
  1541.     "stuttered-write-all-and-quit"    !FEWNAMES
  1542.     <if repeated, leave the editor, writing modified buffers as needed>
  1543. #
  1544. # --------------------------- Win32 Key Bindings -----------------------
  1545. #
  1546. # Key bindings from here to the end of file use the following special
  1547. # Win32 keyboard modifiers:  SHIFT, CTRL (control key), and ALT.  To
  1548. # date, only the following keys may be bound to these modifiers:
  1549. #
  1550. #     Insert   '6'
  1551. #
  1552. # Why, you ask?  Good question.  I actually wanted to extend vile to
  1553. # permit the user to bind any QWERTY key with the aforementioned modifiers
  1554. # and truly open up the "map space" for Win32 users.  However, after reading
  1555. # Chapter 5 of _Programming Windows 95_ (by Charles Petzold), it became
  1556. # clear to me that adding the necessary infrastructre (in ntconio.c and
  1557. # ntwinio.c) would most likely have a very negative impact on non-English
  1558. # users (i.e., most of the dead key support for diacritic marks would be
  1559. # lost if ntconio.c and ntwinio.c began translating the full spectrum of
  1560. # Windows KEYDOWN and CHAR messages).  Consequently, it's much safer to
  1561. # add special modifier bindings (e.g., Alt+Insert), on a case-by-case basis
  1562. # to keys that probably won't be used:
  1563. #
  1564. # a) in future winvile menus, and
  1565. # b) as diacritic generating keys.
  1566. #
  1567. # If you want to add additional bindings, say Alt+Delete, you'll need to
  1568. # modify (at least):
  1569. #
  1570. #   bind.c   (to properly decode the Delete key)
  1571. #   mktbls.c (to accept Delete when parsing W32KY specifications in this file)
  1572. #
  1573. # Other bindings may require modifications to the keyxlate table in
  1574. # ntconio.c and ntwinio.c .  In general, I wouldn't add anymore special
  1575. # Win32 bindings than necessary and I'd definitely read the aforementioned
  1576. # chapter in Petzold's book before making a lot of changes to vile.
  1577. #
  1578. #                               Notes
  1579. #                               -----
  1580. # 1) The key "conditional" (which optionally follows the key binding), must
  1581. #    be hardwired as W32KY (no exceptions).
  1582. #
  1583. # 2) I haven't made any attempt to permit vile users to map/bind the
  1584. #    special modifiers (for all of the reasons listed above).  Basically,
  1585. #    this is a one-way feature (i.e., the bindings are applied only at
  1586. #    compile time and only via this file).
  1587. #
  1588. # - Clark Morgan  July, 1998
  1589. #
  1590. cbrdcpy_unnamed NONE             SYS_WINNT
  1591.     "copy-unnamed-reg-to-clipboard"
  1592.     'ALT+INSERT'            W32KY
  1593.     <copies the unnamed register selection to the windows clipboard>
  1594. cbrdpaste REDO|UNDO            SYS_WINNT
  1595.     "paste-from-clipboard"
  1596.     'SHIFT+INSERT'            W32KY
  1597.     <paste the windows clipboard contents>
  1598. opercbrdcpy    OPER|(RANGE|NOMOVE)    SYS_WINNT
  1599.     "copy-to-clipboard"
  1600.     'CTRL+INSERT'            W32KY
  1601.     <copies the specified region to the windows clipboard>
  1602.