nv_cmd / nv_cmds
static const struct nv_cmd
{
int cmd_char; // (first) command character
nv_func_T cmd_func; // function for this command
short_u cmd_flags; // NV_ flags
short cmd_arg; // value for ca.arg (The type of ca is cmdarg_T)
} nv_cmds[] =
{
{NUL, nv_error, 0, 0},
{Ctrl_A, nv_addsub, 0, 0},
{Ctrl_B, nv_page, NV_STS, BACKWARD},
…
};
The function pointer points to a function that is able to process the normal/visual mode command.
nv_cmds
is an array of nv_cmd
which stores all possible normal or visual mode commands.
The function pointer is called within the function normal_cmd()
.