summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/mango/remap.lua
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-28 18:49:44 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-28 18:51:50 +0100
commit5cd9f33cd2dcd7a54fc46a57fd5402ff1c1ea276 (patch)
tree90a71cd04df41cf44c77dfb2177b257e1bbd5ae3 /.config/nvim/lua/mango/remap.lua
parent8b9a6b26b520bbbdb462c15f0b2bcbbd22856fc9 (diff)
nvim: Add <leader>s and <leader>S for creating scratch buffers
Diffstat (limited to '.config/nvim/lua/mango/remap.lua')
-rw-r--r--.config/nvim/lua/mango/remap.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/nvim/lua/mango/remap.lua b/.config/nvim/lua/mango/remap.lua
index dadb5c0..6de5149 100644
--- a/.config/nvim/lua/mango/remap.lua
+++ b/.config/nvim/lua/mango/remap.lua
@@ -44,3 +44,12 @@ remap('n', '-', ':Ex<CR>')
-- bottom instead of the left or top
remap('n', '–', ':vsplit | Ex<CR>')
remap('n', 'g–', ':split | Ex<CR>')
+
+remap('n', '<leader>s', function()
+ vim.cmd('vsplit')
+ lib.scratch_buffer()
+end)
+remap('n', '<leader>S', function()
+ vim.cmd('split')
+ lib.scratch_buffer()
+end)