fix(keymap): add TUI scroll binds

This commit is contained in:
2026-05-10 02:19:45 +02:00
parent 378c3622a8
commit cf6f78c3f5
+23
View File
@@ -31,6 +31,29 @@ end)
-- Enable <C-w> window commands in terminal mode
vim.keymap.set("t", "<C-w>", "<C-\\><C-n><C-w>")
--- Binds for scrolling in TUIs
vim.keymap.set("t", "<C-u>", function()
vim.api.nvim_feedkeys(
vim.api.nvim_replace_termcodes("<PageUp>", true, false, true),
"n",
false
)
end)
vim.keymap.set("t", "<C-d>", function()
vim.api.nvim_feedkeys(
vim.api.nvim_replace_termcodes("<PageDown>", true, false, true),
"n",
false
)
end)
vim.keymap.set("t", "<C-q>", function()
vim.api.nvim_feedkeys(
vim.api.nvim_replace_termcodes("<C-d>", true, false, true),
"n",
false
)
end)
-- Use :diffput/get instead of normal one to allow staging visual selection
vim.keymap.set({ "n", "x" }, "<leader>dp", ":diffput<CR>")
vim.keymap.set({ "n", "x" }, "<leader>do", ":diffget<CR>")