refactor(terminals): change keymap for sending enter in terminal mode
This commit is contained in:
1 parent
8931dc4589
commit
258b1c2c3c
1 file changed
+3
-2
@@ -102,11 +102,12 @@ function M.setup()
|
|||||||
vim.fn.chansend(term.job_id, "\x10") -- raw Ctrl-P
|
vim.fn.chansend(term.job_id, "\x10") -- raw Ctrl-P
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_buf_set_keymap(term.bufnr, "t", "<S-CR>", "", {
|
|
||||||
|
vim.api.nvim_buf_set_keymap(term.bufnr, "t", "<C-j>", "", {
|
||||||
noremap = true,
|
noremap = true,
|
||||||
silent = true,
|
silent = true,
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.fn.chansend(term.job_id, "\x1b[13;2u") -- kitty protocol Shift+Enter
|
vim.fn.chansend(term.job_id, "\x0a") -- Ctrl+J / LF — always works in opencode
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_buf_set_keymap(
|
vim.api.nvim_buf_set_keymap(
|
||||||
|
|||||||
Reference in new issue
Block a user