From 905300a5e8380b7c3bb544cfcca29a51078a0795 Mon Sep 17 00:00:00 2001 From: Sirisak Lueangsaksri <1087399+spywhere@users.noreply.github.com> Date: Fri, 3 Nov 2023 11:30:25 +0700 Subject: [PATCH] feat(nvim): allow resize in terminal --- configs/nvim/lua/editor/split-and-buffer.lua | 8 ++++---- configs/nvim/lua/lib/bindings.lua | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configs/nvim/lua/editor/split-and-buffer.lua b/configs/nvim/lua/editor/split-and-buffer.lua index 93d9636..2199f1f 100644 --- a/configs/nvim/lua/editor/split-and-buffer.lua +++ b/configs/nvim/lua/editor/split-and-buffer.lua @@ -3,10 +3,10 @@ local registry = require('lib.registry') local split_management = function () -- split resize - bindings.map.normal('', 'vertical resize -5') - bindings.map.normal('', 'vertical resize +5') - bindings.map.normal('', 'resize +5') - bindings.map.normal('', 'resize -5') + bindings.map.nt('', 'vertical resize -5') + bindings.map.nt('', 'vertical resize +5') + bindings.map.nt('', 'resize +5') + bindings.map.nt('', 'resize -5') bindings.map.normal('', 'vertical resize -1') bindings.map.normal('', 'vertical resize +1') bindings.map.normal('', 'resize +1') diff --git a/configs/nvim/lua/lib/bindings.lua b/configs/nvim/lua/lib/bindings.lua index 40baae3..0ff286e 100644 --- a/configs/nvim/lua/lib/bindings.lua +++ b/configs/nvim/lua/lib/bindings.lua @@ -103,7 +103,8 @@ local map = function (mapper) operator = keymap {'o'}, terminal = keymap {'t'}, ni = keymap {'n', 'i'}, - nv = keymap {'n', 'v'} + nv = keymap {'n', 'v'}, + nt = keymap {'n', 't'} } end