home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / vim-2.0.lha / Vim-2.0 / src / cmdtab.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-15  |  7.1 KB  |  239 lines

  1. /* vi:ts=4
  2.  *
  3.  * VIM - Vi IMproved
  4.  *
  5.  * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  6.  *                            Tim Thompson            twitch!tjt
  7.  *                            Tony Andrews            onecom!wldrdg!tony 
  8.  *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  9.  */
  10.  
  11. /*
  12.  * THIS FILE IS AUTOMATICALLY PRODUCED - DO NOT EDIT
  13.  */
  14.  
  15. #define RANGE    0x01            /* allow a linespecs */
  16. #define BANG    0x02            /* allow a ! after the command name */
  17. #define EXTRA    0x04            /* allow extra args after command name */
  18. #define XFILE    0x08            /* expand wildcards in extra part */
  19. #define NOSPC    0x10            /* no spaces allowed in the extra part */
  20. #define    DFLALL    0x20            /* default file range is 1,$ */
  21. #define NODFL    0x40            /* do not default to the current file name */
  22. #define NEEDARG    0x80            /* argument required */
  23. #define TRLBAR    0x100            /* check for trailing vertical bar */
  24. #define REGSTR    0x200            /* allow "x for register designation */
  25. #define COUNT    0x400            /* allow count in argument */
  26. #define NOTRLCOM 0x800            /* no trailing comment allowed */
  27. #define ZEROR    0x1000            /* zero line number allowed */
  28. #define USECTRLV 0x2000            /* do not remove CTRL-V from argument */
  29. #define FILES    (XFILE + EXTRA)    /* multiple extra files allowed */
  30. #define WORD1    (EXTRA + NOSPC)    /* one extra word allowed */
  31. #define FILE1    (FILES + NOSPC)    /* 1 file allowed, defaults to current file */
  32. #define NAMEDF    (FILE1 + NODFL)    /* 1 file allowed, defaults to "" */
  33. #define NAMEDFS    (FILES + NODFL)    /* multiple files allowed, default is "" */
  34.  
  35. /*
  36.  * This array maps ex command names to command codes. The order in which
  37.  * command names are listed below is significant -- ambiguous abbreviations
  38.  * are always resolved to be the first possible match (e.g. "r" is taken
  39.  * to mean "read", not "rewind", because "read" comes before "rewind").
  40.  * Not supported commands are included to avoid ambiguities.
  41.  */
  42. static struct
  43. {
  44.     char    *cmd_name;    /* name of the command */
  45.     short     cmd_argt;    /* command line arguments permitted/needed/used */
  46. } cmdnames[] =
  47. {
  48.     {"append",        BANG+RANGE+TRLBAR},            /* not supported */
  49. #define CMD_append 0
  50.     {"abbreviate",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  51. #define CMD_abbreviate 1
  52.     {"args",        TRLBAR},
  53. #define CMD_args 2
  54.     {"change",        BANG+RANGE+COUNT+TRLBAR},    /* not supported */
  55. #define CMD_change 3
  56.     {"cabbrev",        EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  57. #define CMD_cabbrev 4
  58.     {"cc",            TRLBAR+WORD1+BANG},
  59. #define CMD_cc 5
  60.     {"cd",            NAMEDF+TRLBAR},
  61. #define CMD_cd 6
  62.     {"center",        TRLBAR+RANGE+EXTRA},
  63. #define CMD_center 7
  64.     {"cf",            TRLBAR+FILE1+BANG},
  65. #define CMD_cf 8
  66.     {"chdir",        NAMEDF+TRLBAR},
  67. #define CMD_chdir 9
  68.     {"cl",            TRLBAR},
  69. #define CMD_cl 10
  70.     {"cmap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  71. #define CMD_cmap 11
  72.     {"cn",            TRLBAR+BANG},
  73. #define CMD_cn 12
  74.     {"cnoremap",    BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  75. #define CMD_cnoremap 13
  76.     {"cnoreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  77. #define CMD_cnoreabbrev 14
  78.     {"copy",        RANGE+EXTRA+TRLBAR},
  79. #define CMD_copy 15
  80.     {"cp",            TRLBAR+BANG},
  81. #define CMD_cp 16
  82.     {"cq",            TRLBAR+BANG},
  83. #define CMD_cq 17
  84.     {"cunmap",        BANG+EXTRA+TRLBAR+USECTRLV},
  85. #define CMD_cunmap 18
  86.     {"cunabbrev",    EXTRA+TRLBAR+USECTRLV},
  87. #define CMD_cunabbrev 19
  88.     {"delete",        RANGE+REGSTR+COUNT+TRLBAR},
  89. #define CMD_delete 20
  90.     {"display",        TRLBAR},
  91. #define CMD_display 21
  92.     {"digraphs",    EXTRA+TRLBAR},
  93. #define CMD_digraphs 22
  94.     {"edit",        BANG+FILE1+TRLBAR},
  95. #define CMD_edit 23
  96.     {"ex",            BANG+FILE1+TRLBAR},
  97. #define CMD_ex 24
  98.     {"file",        FILE1+TRLBAR},
  99. #define CMD_file 25
  100.     {"files",        TRLBAR},
  101. #define CMD_files 26
  102.     {"global",        RANGE+BANG+EXTRA+DFLALL},
  103. #define CMD_global 27
  104.     {"help",        TRLBAR},
  105. #define CMD_help 28
  106.     {"insert",        BANG+RANGE+TRLBAR},            /* not supported */
  107. #define CMD_insert 29
  108.     {"iabbrev",        EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  109. #define CMD_iabbrev 30
  110.     {"imap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  111. #define CMD_imap 31
  112.     {"inoremap",    BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  113. #define CMD_inoremap 32
  114.     {"inoreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  115. #define CMD_inoreabbrev 33
  116.     {"iunmap",        BANG+EXTRA+TRLBAR+USECTRLV},
  117. #define CMD_iunmap 34
  118.     {"iunabbrev",    EXTRA+TRLBAR+USECTRLV},
  119. #define CMD_iunabbrev 35
  120.     {"join",        RANGE+COUNT+TRLBAR},
  121. #define CMD_join 36
  122.     {"jumps",        TRLBAR},
  123. #define CMD_jumps 37
  124.     {"k",            RANGE+WORD1+TRLBAR},
  125. #define CMD_k 38
  126.     {"list",        RANGE+COUNT+TRLBAR},
  127. #define CMD_list 39
  128.     {"left",        TRLBAR+RANGE+EXTRA},
  129. #define CMD_left 40
  130.     {"move",        RANGE+EXTRA+TRLBAR},
  131. #define CMD_move 41
  132.     {"mark",        RANGE+WORD1+TRLBAR},
  133. #define CMD_mark 42
  134.     {"marks",        TRLBAR},
  135. #define CMD_marks 43
  136.     {"map",            BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  137. #define CMD_map 44
  138.     {"make",        NEEDARG+EXTRA+TRLBAR+XFILE},
  139. #define CMD_make 45
  140.     {"mkexrc",        BANG+FILE1+TRLBAR},
  141. #define CMD_mkexrc 46
  142.     {"mkvimrc",        BANG+FILE1+TRLBAR},
  143. #define CMD_mkvimrc 47
  144.     {"next",        RANGE+BANG+NAMEDFS+TRLBAR},
  145. #define CMD_next 48
  146.     {"number",        RANGE+COUNT+TRLBAR},
  147. #define CMD_number 49
  148.     {"noremap",        BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  149. #define CMD_noremap 50
  150.     {"noreabbrev",    EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
  151. #define CMD_noreabbrev 51
  152.     {"Next",        RANGE+BANG+TRLBAR},
  153. #define CMD_Next 52
  154.     {"print",        RANGE+COUNT+TRLBAR},
  155. #define CMD_print 53
  156.     {"pop",            RANGE+TRLBAR+ZEROR},
  157. #define CMD_pop 54
  158.     {"put",            RANGE+BANG+REGSTR+TRLBAR},
  159. #define CMD_put 55
  160.     {"previous",    RANGE+BANG+TRLBAR},
  161. #define CMD_previous 56
  162.     {"pwd",            TRLBAR},
  163. #define CMD_pwd 57
  164.     {"quit",        BANG+TRLBAR},
  165. #define CMD_quit 58
  166.     {"read",        RANGE+NAMEDF+NEEDARG+TRLBAR+ZEROR},
  167. #define CMD_read 59
  168.     {"rewind",        BANG+TRLBAR},
  169. #define CMD_rewind 60
  170.     {"recover",        FILE1+TRLBAR},                /* not supported */
  171. #define CMD_recover 61
  172.     {"redo",        TRLBAR},
  173. #define CMD_redo 62
  174.     {"right",        TRLBAR+RANGE+EXTRA},
  175. #define CMD_right 63
  176.     {"substitute",    RANGE+EXTRA},
  177. #define CMD_substitute 64
  178.     {"suspend",        TRLBAR+BANG},
  179. #define CMD_suspend 65
  180.     {"set",            EXTRA+TRLBAR},
  181. #define CMD_set 66
  182.     {"setkeymap",    NAMEDF+TRLBAR},
  183. #define CMD_setkeymap 67
  184.     {"shell",        TRLBAR},
  185. #define CMD_shell 68
  186.     {"source",        NAMEDF+NEEDARG+TRLBAR},
  187. #define CMD_source 69
  188.     {"stop",        TRLBAR+BANG},
  189. #define CMD_stop 70
  190.     {"t",            RANGE+EXTRA+TRLBAR},
  191. #define CMD_t 71
  192.     {"tag",            RANGE+BANG+WORD1+TRLBAR+ZEROR},
  193. #define CMD_tag 72
  194.     {"tags",        TRLBAR},
  195. #define CMD_tags 73
  196.     {"undo",        TRLBAR},
  197. #define CMD_undo 74
  198.     {"unabbreviate", EXTRA+TRLBAR+USECTRLV},
  199. #define CMD_unabbreviate 75
  200.     {"unmap",        BANG+EXTRA+TRLBAR+USECTRLV},
  201. #define CMD_unmap 76
  202.     {"vglobal",        RANGE+EXTRA+DFLALL},
  203. #define CMD_vglobal 77
  204.     {"version",        TRLBAR},
  205. #define CMD_version 78
  206.     {"visual",        RANGE+BANG+FILE1+TRLBAR},
  207. #define CMD_visual 79
  208.     {"write",        RANGE+BANG+FILE1+DFLALL+TRLBAR},
  209. #define CMD_write 80
  210.     {"wnext",        RANGE+BANG+FILE1+TRLBAR},
  211. #define CMD_wnext 81
  212.     {"winsize",        EXTRA+NEEDARG+TRLBAR},
  213. #define CMD_winsize 82
  214.     {"wq",            BANG+FILE1+DFLALL+TRLBAR},
  215. #define CMD_wq 83
  216.     {"xit",            BANG+FILE1+DFLALL+TRLBAR},
  217. #define CMD_xit 84
  218.     {"yank",        RANGE+REGSTR+COUNT+TRLBAR},
  219. #define CMD_yank 85
  220.     {"z",            RANGE+COUNT+TRLBAR},        /* not supported */
  221. #define CMD_z 86
  222.     {"@",            RANGE+EXTRA+TRLBAR},
  223. #define CMD_at 87
  224.     {"!",            RANGE+NAMEDFS},
  225. #define CMD_bang 88
  226.     {"<",            RANGE+COUNT+TRLBAR},
  227. #define CMD_lshift 89
  228.     {">",            RANGE+COUNT+TRLBAR},
  229. #define CMD_rshift 90
  230.     {"=",            RANGE+TRLBAR},
  231. #define CMD_equal 91
  232.     {"&",            RANGE+EXTRA},
  233. #define CMD_and 92
  234.     {"~",            RANGE+TRLBAR}                /* not supported */
  235. #define CMD_tilde 93
  236. #define CMD_SIZE 94
  237.  
  238. };
  239.