fix(keymap): add TUI scroll binds
This commit is contained in:
@@ -31,6 +31,29 @@ end)
|
|||||||
-- Enable <C-w> window commands in terminal mode
|
-- Enable <C-w> window commands in terminal mode
|
||||||
vim.keymap.set("t", "<C-w>", "<C-\\><C-n><C-w>")
|
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
|
-- 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>dp", ":diffput<CR>")
|
||||||
vim.keymap.set({ "n", "x" }, "<leader>do", ":diffget<CR>")
|
vim.keymap.set({ "n", "x" }, "<leader>do", ":diffget<CR>")
|
||||||
|
|||||||
Reference in New Issue
Block a user