From 5059c463187b5316dce40ff88cde913147e8f556 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 5 Dec 2024 10:28:18 -0600 Subject: [PATCH] neovim: add insert mode save keymap --- home/modules/tui/neovim/keymaps.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/home/modules/tui/neovim/keymaps.nix b/home/modules/tui/neovim/keymaps.nix index 14ab1fc..b153d1e 100644 --- a/home/modules/tui/neovim/keymaps.nix +++ b/home/modules/tui/neovim/keymaps.nix @@ -66,10 +66,20 @@ # sort "s" = ":sort"; }; + insert = + lib.mapAttrsToList + (key: action: { + mode = "i"; + inherit action key; + }) + { + # Save by Ctrl+s + "" = ":w"; + }; in config.lib.nixvim.keymaps.mkKeymaps {options.silent = true;} - (normal ++ visual); + (normal ++ visual ++ insert); }; }