Add ctrl+left/right on jjui textarea

This commit is contained in:
2026-07-26 13:11:37 +02:00
parent 1db3865770
commit cd077d8912
2 changed files with 15 additions and 2 deletions
+13 -1
View File
@@ -1,4 +1,4 @@
{
{pkgs, ...}: {
programs.jujutsu = {
enable = true;
settings = {
@@ -49,6 +49,18 @@
programs.jjui = {
enable = true;
# while waiting for https://github.com/charmbracelet/bubbles/pull/1020
package = pkgs.jjui.overrideAttrs (old: {
postPatch =
(old.postPatch or "")
+ ''
substituteInPlace internal/ui/operations/describe/describe.go \
--replace-fail 'input := textarea.New()' 'input := textarea.New()
input.KeyMap.WordForward.SetKeys("alt+right", "alt+f", "ctrl+right")
input.KeyMap.WordBackward.SetKeys("alt+left", "alt+b", "ctrl+left")
input.KeyMap.DeleteWordBackward.SetKeys("alt+backspace", "ctrl+w", "ctrl+backspace")'
'';
});
settings = {
actions = [
{
+2 -1
View File
@@ -63,8 +63,9 @@ vim.g.did_install_default_menus = 1
-- for all modes except terminal
vim.keymap.set({ "i", "n", "o", "x", "v", "s", "l", "c" }, "<C-c>", "<esc>")
-- <esc> leaves terminal mode, <C-q> sends a real <esc> to the terminal app
vim.keymap.set("t", "<esc>", "<C-\\><C-N>", { desc = "Normal mode" })
vim.keymap.set("t", "<S-Esc>", "<esc>", { desc = "Send escape to terminal" })
vim.keymap.set("t", "<C-q>", "<esc>", { desc = "Send escape to terminal" })
-- Why is this not the default?
vim.keymap.set("c", "<c-a>", "<home>", { desc = "Begining" })