From 01c7e0d95a0cedf586e4375f2078a8343337aa7f Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 12 Jun 2024 00:14:09 -0500 Subject: [PATCH] feat(nvim): allow split terms to be spawned in any mode --- users/price/dots/.config/nvim/lua/neovide.lua | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/users/price/dots/.config/nvim/lua/neovide.lua b/users/price/dots/.config/nvim/lua/neovide.lua index f6540ce0..11e54eb6 100644 --- a/users/price/dots/.config/nvim/lua/neovide.lua +++ b/users/price/dots/.config/nvim/lua/neovide.lua @@ -29,10 +29,32 @@ vim.keymap.set({ "", "!", "v", "t" }, "", "tabprevious", { noremap -- Spawn new terminal in new tab vim.keymap.set({ "", "!", "v", "t" }, "", "tabnew | terminal", { noremap = true, silent = true }) -vim.keymap.set({ "n" }, "", "vertical belowright terminal", { noremap = true, silent = true }) -vim.keymap.set({ "n" }, "", "vertical aboveleft terminal", { noremap = true, silent = true }) -vim.keymap.set({ "n" }, "", "horizontal aboveleft terminal", { noremap = true, silent = true }) -vim.keymap.set({ "n" }, "", "horizontal belowright terminal", { noremap = true, silent = true }) + +-- Spawn terminal in split direction +vim.keymap.set( + { "", "!", "v", "t" }, + "", + "vertical belowright terminal", + { noremap = true, silent = true } +) +vim.keymap.set( + { "", "!", "v", "t" }, + "", + "vertical aboveleft terminal", + { noremap = true, silent = true } +) +vim.keymap.set( + { "", "!", "v", "t" }, + "", + "horizontal aboveleft terminal", + { noremap = true, silent = true } +) +vim.keymap.set( + { "", "!", "v", "t" }, + "", + "horizontal belowright terminal", + { noremap = true, silent = true } +) -- Zoom in & out vim.g.neovide_scale_factor = 1