From 0abbcf0fd20e7e918805e94b99d9f77c288c3e66 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:45:36 -0500 Subject: [PATCH] added some key bindings for compatibility --- modules/programs/zsh.nix | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 5e9bb3f..ca49d4a 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -1,6 +1,23 @@ { self, inputs, ... }: let username = "john"; + homeEndKeyBindings = '' + # Normalize common Home/End escape sequences across terminal emulators. + bindkey "^[[H" beginning-of-line + bindkey "^[[F" end-of-line + bindkey "^[[1~" beginning-of-line + bindkey "^[[4~" end-of-line + bindkey "^[[7~" beginning-of-line + bindkey "^[[8~" end-of-line + bindkey "^[OH" beginning-of-line + bindkey "^[OF" end-of-line + + # Normalize common Ctrl+Arrow sequences for word-wise movement. + bindkey "^[[1;5D" backward-word + bindkey "^[[1;5C" forward-word + bindkey "^[[5D" backward-word + bindkey "^[[5C" forward-word + ''; in { flake.modules = { @@ -20,7 +37,10 @@ in enableCompletion = true; autosuggestion.enable = true; # syntaxHighlighting.enable = true; - initContent = "HOST=$(hostname -s)"; + initContent = '' + HOST=$(hostname -s) + ${homeEndKeyBindings} + ''; dotDir = "${config.xdg.configHome}/zsh"; history = { append = true; @@ -108,6 +128,8 @@ in HOSTNAME=$(hostname -s) + ${homeEndKeyBindings} + eval "$(direnv hook zsh)" ${aliasStr}