You can't.
Here's the C source code for what <C-w><C-i>
does:
normal.c
:
/*
* This table contains one entry for every Normal or Visual mode command.
* The order doesn't matter, init_normal_cmds() will create a sorted index.
* It is faster when all keys from zero to '~' are present.
*/
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 */
} nv_cmds[] =
{
[...]
{Ctrl_W, nv_window, 0, 0},
};
[...]
/*
* CTRL-W: Window commands
*/
static void
nv_window(cmdarg_T *cap)
{
if (!checkclearop(cap->oap))
do_window(cap->nchar, cap->count0, NUL); /* everything is in window.c */
}
window.c
:
/*
* all CTRL-W window commands are handled here, called from normal_cmd().
*/
void
do_window(
[..]
) {
switch (nchar)
{
[..]
case 'i': /* Go to any match */
case Ctrl_I:
type = FIND_ANY;
/* FALLTHROUGH */
[..]
default: beep_flush();
break;
I'm not entirely sure where the type
variable gets picked up, I didn't feel like looking that up, but the point is, that there is no real facility to say "this key is mapped to this functionality". It's basically just a struct
which maps a char
to a function, and the implementation of the second keystroke (<C-i>
) is simply ad-hoc ugliness!
This is different from Emacs, where (I presume) everything is in Lisp, and your custom mappings are not any different from Emacs' default mappings. But in Vim you have "magic" mappings that are provided by the C code which map against C functions that are never exposed in Vim. I always say that Vim has the better idea, but Emacs has the better implementation ;-)
So the only way is to look it up in the help files. This is why I closed this as a duplicate of How do I navigate to topics in Vim's documentation since that's the only practical answer anyone can give. One could indeed argue that a more in-depth explanation to the question could be given (as I have just done), and had you argued that, instead of giving the (now-deleted) response, I would probably have said "you're right, sorry for the mistake" and re-opened it ;-)
At any rate, to briefly illustrate the conventions with some examples:
:help w
− normal mode mapping for w
(case-sensitive);
:help g8
− normal mode mapping for g8
;
:help v_o
− visual mode mapping for o
; other modes are c
for command-line and i
for insert;
:help CTRL-W
− normal mode mapping for <C-w>
;
:help i_CTRL-W
− insert mode mapping for <C-w>
;
:help CTRL-W_CTRL-I
− normal mode mapping for <C-w><C-i>
;
:help i_CTRL-G_<Down>
− insert mode mapping for <C-g><Down>
.
:help CTRL-W_CTRL-I
or:help CTRL-W_i