From ef309868a758ca7087c6d1ed1c8156172fe9b96a Mon Sep 17 00:00:00 2001 From: triethyl Date: Tue, 5 Aug 2025 21:37:07 -0400 Subject: neovim: moved to mini-pairs and cleaned up --- pkgs/custom-neovim/config/lua/mappings.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pkgs/custom-neovim/config/lua/mappings.lua') diff --git a/pkgs/custom-neovim/config/lua/mappings.lua b/pkgs/custom-neovim/config/lua/mappings.lua index 8c670f4..ec5788b 100644 --- a/pkgs/custom-neovim/config/lua/mappings.lua +++ b/pkgs/custom-neovim/config/lua/mappings.lua @@ -74,6 +74,16 @@ mapkey({"n", "v"}, "x", "Really delete character", [["_x]]) mapkey({"n", "v"}, "j", "Go down visually", "gj") mapkey({"n", "v"}, "k", "Go up visually", "gk") +-- Exit neovim +mapkey("n", "q", "Save and exit neovim", function() + vim.cmd("wa!") + vim.cmd("qa!") +end) + +mapkey("n", "Q", "Exit neovim", function() + vim.cmd("qa!") +end) + -- Learn hjkl. -- mapkey({"n", "v"}, "", "Correct the keypress", function() print("Try pressing h instead.") end) -- mapkey({"n", "v"}, "", "Correct the keypress", function() print("Try pressing j instead.") end) -- cgit v1.2.3