aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds.lua3
-rw-r--r--src/nvim/ex_cmds_defs.h15
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