Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

keymapsOnEvents

Register keymaps on an event instead of when nvim opens. Keys are the events to register on, and values are lists of keymaps to register on each event.

Type: attribute set of list of (submodule)

Default: { }

Example:

{
  InsertEnter = [
    {
      action = {
        __raw = "require(\"cmp\").mapping.confirm()";
      };
      key = "<C-y>";
    }
    {
      action = {
        __raw = "require(\"cmp\").mapping.select_next_item()";
      };
      key = "<C-n>";
    }
  ];
}

Declared by:

keymapsOnEvents.<name>.*.action

The action to execute.

Type: string or raw lua code

Declared by:

keymapsOnEvents.<name>.*.key

The key to map.

Type: string

Example: "<C-m>"

Declared by:

keymapsOnEvents.<name>.*.mode

One or several modes. Use the short-names ("n", "v", …). See :h map-modes to learn more.

Type: one of or non-empty list of “”, “n”, “!”, “i”, “c”, “v”, “x”, “s”, “o”, “t”, “l”, “!a”, “ia”, “ca”

Default: ""

Example:

[
  "n"
  "v"
]

Declared by: