mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib/keymaps: add abbreviation support to modes
enum
See https://neovim.io/doc/user/usr_24.html#_abbreviations
This commit is contained in:
parent
a1e168a2a0
commit
d3a25cb97f
2 changed files with 8 additions and 0 deletions
|
@ -427,9 +427,14 @@ You can provide several modes to a single mapping by using a list of strings.
|
||||||
| `"o"` | - | - | - | - | - | yes | - | - | Operator-pending mode |
|
| `"o"` | - | - | - | - | - | yes | - | - | Operator-pending mode |
|
||||||
| `"t"` | - | - | - | - | - | - | yes | - | Terminal mode |
|
| `"t"` | - | - | - | - | - | - | yes | - | Terminal mode |
|
||||||
| `"l"` | - | yes | yes | - | - | - | - | yes | Insert, command-line and lang-arg mode |
|
| `"l"` | - | yes | yes | - | - | - | - | yes | Insert, command-line and lang-arg mode |
|
||||||
|
| `"!a"` | - | abr | abr | - | - | - | - | - | [Abbreviation] in insert and command-line mode |
|
||||||
|
| `"ia"` | - | abr | - | - | - | - | - | - | [Abbreviation] in insert mode |
|
||||||
|
| `"ca"` | - | - | abr | - | - | - | - | - | [Abbreviation] in command-line mode |
|
||||||
|
|
||||||
Each keymap can specify the following settings in the `options` attrs.
|
Each keymap can specify the following settings in the `options` attrs.
|
||||||
|
|
||||||
|
[Abbreviation]: https://neovim.io/doc/user/usr_24.html#_abbreviations
|
||||||
|
|
||||||
| NixVim | Default | VimScript |
|
| NixVim | Default | VimScript |
|
||||||
|---------|---------|---------------------------------------------------|
|
|---------|---------|---------------------------------------------------|
|
||||||
| silent | false | `<silent>` |
|
| silent | false | `<silent>` |
|
||||||
|
|
|
@ -37,6 +37,9 @@ rec {
|
||||||
"o" # operator-pending
|
"o" # operator-pending
|
||||||
"t" # terminal
|
"t" # terminal
|
||||||
"l" # insert, command-line and lang-arg
|
"l" # insert, command-line and lang-arg
|
||||||
|
"!a" # abbreviation in insert and command-line
|
||||||
|
"ia" # abbreviation in insert
|
||||||
|
"ca" # abbreviation in command
|
||||||
];
|
];
|
||||||
|
|
||||||
modeEnum = lib.types.enum modes;
|
modeEnum = lib.types.enum modes;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue