neovim: add insert mode save keymap

This commit is contained in:
John Bowdre 2024-12-05 10:28:18 -06:00
parent c955e117e8
commit 5059c46318
Signed by: john
SSH key fingerprint: SHA256:cZYnOxaLdo+MhBNMX38ihO/p2Kek6fBykSFoJwHBhUo

View file

@ -66,10 +66,20 @@
# sort # sort
"<leader>s" = ":sort<CR>"; "<leader>s" = ":sort<CR>";
}; };
insert =
lib.mapAttrsToList
(key: action: {
mode = "i";
inherit action key;
})
{
# Save by Ctrl+s
"<C-s>" = "<Esc>:w<CR>";
};
in in
config.lib.nixvim.keymaps.mkKeymaps config.lib.nixvim.keymaps.mkKeymaps
{options.silent = true;} {options.silent = true;}
(normal ++ visual); (normal ++ visual ++ insert);
}; };
} }