mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +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 |
|
||||
| `"t"` | - | - | - | - | - | - | yes | - | Terminal 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.
|
||||
|
||||
[Abbreviation]: https://neovim.io/doc/user/usr_24.html#_abbreviations
|
||||
|
||||
| NixVim | Default | VimScript |
|
||||
|---------|---------|---------------------------------------------------|
|
||||
| silent | false | `<silent>` |
|
||||
|
|
|
@ -37,6 +37,9 @@ rec {
|
|||
"o" # operator-pending
|
||||
"t" # terminal
|
||||
"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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue