From d542e373f16cfa03ef7ad71f4cf6d479144a08a6 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sat, 15 Feb 2025 13:33:20 +0000 Subject: [PATCH] readme: use `:h map-table` for mapping modes Based on `:h map-table` https://neovim.io/doc/user/map.html#map-table --- README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a7102d18..edc59555 100644 --- a/README.md +++ b/README.md @@ -412,19 +412,21 @@ nnoremap m make This table describes all modes for the `keymaps` option. You can provide several modes to a single mapping by using a list of strings. -| Short | Description | -|-------|--------------------------------------------------| -| `"n"` | Normal mode | -| `"i"` | Insert mode | -| `"v"` | Visual and Select mode | -| `"s"` | Select mode | -| `"t"` | Terminal mode | -| `"" ` | Normal, visual, select and operator-pending mode | -| `"x"` | Visual mode only, without select | -| `"o"` | Operator-pending mode | -| `"!"` | Insert and command-line mode | -| `"l"` | Insert, command-line and lang-arg mode | -| `"c"` | Command-line mode | + + +| Mode | Norm | Ins | Cmd | Vis | Sel | Opr | Term | Lang | Description | +|--------|------|-----|-----|-----|-----|-----|------|------|-------------| +| `""` | yes | - | - | yes | yes | yes | - | - | Equivalent to `:map` | +| `"n"` | yes | - | - | - | - | - | - | - | Normal mode | +| `"!"` | - | yes | yes | - | - | - | - | - | Insert and command-line mode | +| `"i"` | - | yes | - | - | - | - | - | - | Insert mode | +| `"c"` | - | - | yes | - | - | - | - | - | Command-line mode | +| `"v"` | - | - | - | yes | yes | - | - | - | Visual and Select mode | +| `"x"` | - | - | - | yes | - | - | - | - | Visual mode only, without select | +| `"s"` | - | - | - | - | yes | - | - | - | Select mode | +| `"o"` | - | - | - | - | - | yes | - | - | Operator-pending mode | +| `"t"` | - | - | - | - | - | - | yes | - | Terminal mode | +| `"l"` | - | yes | yes | - | - | - | - | yes | Insert, command-line and lang-arg mode | Each keymap can specify the following settings in the `options` attrs.