mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Add ctrl+left/right on jjui textarea
This commit is contained in:
@@ -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 = [
|
||||
{
|
||||
|
||||
@@ -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" })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user