Search notes:

VIM: src/normal.c

normal.c contains the main routine for processing characters in command mode (aka normal mode?).
Communicates closely with the code in ops.c to handle the operators.

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},
     …
};
nv_cmd is a struct that essentially stores a function pointer and some flags for one normal or visual mode command.
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().

nv_colon()

nv_colon calls do_cmdline to get a command line and execute it.

nv_edit()

nv_edit() is called after pressing one of the following characters in normal mode:

normal_cmd()

normal_cmd() is (repeatedly) called from main_loop() (if exmode_active is FALSE) in order to process normal mode commands.
normal_cmd() gets the next character from safe_vgetc().

Index