diff options
| author | triethyl <triethylammonium@pm.me> | 2025-08-05 21:37:07 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-08-05 21:37:07 -0400 |
| commit | ef309868a758ca7087c6d1ed1c8156172fe9b96a (patch) | |
| tree | a2d78738181ec8512b4ce852151b2b1ed6d467de /pkgs/custom-neovim/config/lua/mappings.lua | |
| parent | ed137d6252bcb217a9d534d7fe1a45bae6ba6866 (diff) | |
neovim: moved to mini-pairs and cleaned up
Diffstat (limited to 'pkgs/custom-neovim/config/lua/mappings.lua')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/mappings.lua | 10 |
1 files changed, 10 insertions, 0 deletions
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"}, "<leader>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", "<leader>q", "Save and exit neovim", function() + vim.cmd("wa!") + vim.cmd("qa!") +end) + +mapkey("n", "<leader>Q", "Exit neovim", function() + vim.cmd("qa!") +end) + -- Learn hjkl. -- mapkey({"n", "v"}, "<left>", "Correct the keypress", function() print("Try pressing h instead.") end) -- mapkey({"n", "v"}, "<down>", "Correct the keypress", function() print("Try pressing j instead.") end) |
