diff --git a/lua/core/keymap.lua b/lua/core/keymap.lua index f0b40c7..872469b 100644 --- a/lua/core/keymap.lua +++ b/lua/core/keymap.lua @@ -31,6 +31,29 @@ end) -- Enable window commands in terminal mode vim.keymap.set("t", "", "") +--- Binds for scrolling in TUIs +vim.keymap.set("t", "", function() + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes("", true, false, true), + "n", + false + ) +end) +vim.keymap.set("t", "", function() + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes("", true, false, true), + "n", + false + ) +end) +vim.keymap.set("t", "", function() + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes("", true, false, true), + "n", + false + ) +end) + -- Use :diffput/get instead of normal one to allow staging visual selection vim.keymap.set({ "n", "x" }, "dp", ":diffput") vim.keymap.set({ "n", "x" }, "do", ":diffget")