diff --git a/README.md b/README.md index 7755e57c21..ed0dd62bc6 100644 --- a/README.md +++ b/README.md @@ -321,18 +321,23 @@ If you are using `makeNixvimWithModule`, then options is treated as options for ## Key mappings It is fully possible to define key mappings from within NixVim. This is done -using the `maps` attribute: +using the `keymaps` attribute: ```nix { programs.nixvim = { - maps = { - normalVisualOp.";" = ":"; - normal."m" = { - silent = true; - action = "make"; + keymaps = [ + { + key = ";"; + action = ":"; + } + { + mode = "n"; + key = "m"; + options.silent = true; + action = "!make"; }; - }; + ]; }; } ``` @@ -344,34 +349,35 @@ noremap ; : nnoremap m make ``` -This table describes all modes for the `maps` option: - -| NixVim | NeoVim | -|----------------|--------------------------------------------------| -| normal | Normal mode | -| insert | Insert mode | -| visual | Visual and Select mode | -| select | Select mode | -| terminal | Terminal mode | -| normalVisualOp | Normal, visual, select and operator-pending mode | -| visualOnly | Visual mode only, without select | -| operator | Operator-pending mode | -| insertCommand | Insert and command-line mode | -| lang | Insert, command-line and lang-arg mode | -| command | Command-line mode | - -The map options can be set to either a string, containing just the action, -or to a set describing additional options: - -| NixVim | Default | VimScript | -|---------|---------|------------------------------------------| -| silent | false | `` | -| nowait | false | `` | -| script | false | `