diff options
author | ZyX <kp-pav@yandex.ru> | 2014-07-22 08:22:39 +0400 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2014-08-20 20:21:37 +0400 |
commit | de58394f34a5e74e9c20027505ee1fd70deabfdd (patch) | |
tree | 2739823423a82d0f27c0d61f9ec0d308282da26e /src | |
parent | 1e11de538578897bf19478caf1a4c667ce3d6b75 (diff) | |
download | rneovim-de58394f34a5e74e9c20027505ee1fd70deabfdd.tar.gz rneovim-de58394f34a5e74e9c20027505ee1fd70deabfdd.tar.bz2 rneovim-de58394f34a5e74e9c20027505ee1fd70deabfdd.zip |
Extend documentation
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds.lua | 3 | ||||
-rw-r--r-- | src/nvim/ex_cmds_defs.h | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index cf4ed751bb..5cd69232aa 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -1,5 +1,6 @@ bit = require 'bit' +-- Description of the values below is contained in ex_cmds_defs.h file. local RANGE = 0x001 local BANG = 0x002 local EXTRA = 0x004 @@ -26,6 +27,8 @@ local EXFLAGS = 0x400000 local FILES = bit.bor(XFILE, EXTRA) local WORD1 = bit.bor(EXTRA, NOSPC) local FILE1 = bit.bor(FILES, NOSPC) + +-- The following table is described in ex_cmds_defs.h file. return { { command='append', diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h index 66c42a7111..abf7cc4587 100644 --- a/src/nvim/ex_cmds_defs.h +++ b/src/nvim/ex_cmds_defs.h @@ -21,6 +21,21 @@ * 1. Add an entry to the table in src/nvim/ex_cmds.lua. Keep it sorted on the * shortest version of the command name that works. If it doesn't start with * a lower case letter, add it at the end. + * + * Each table entry is a table with the following keys: + * + * Key | Description + * ------- | ------------------------------------------------------------- + * command | Name of the command. Required. + * enum | Name of the enum entry. If not set defaults to CMD_{command}. + * flags | A set of the flags from below list joined by bitwise or. + * func | Name of the function containing the implementation. + * + * Referenced function should be either non-static one or defined in + * ex_docmd.c and be coercible to ex_func_T type from below. + * + * All keys not described in the above table are reserved for future use. + * * 2. Add a "case: CMD_xxx" in the big switch in ex_docmd.c. * 3. Add an entry in the index for Ex commands at ":help ex-cmd-index". * 4. Add documentation in ../doc/xxx.txt. Add a tag for both the short and |