From 741c17aac546b93e6896c4d6ef1776b6dbb3cc8f Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 18 Oct 2024 11:45:40 -0400 Subject: [PATCH] ZSH: add key binding to skip words --- modules/users/common/home-manager/zsh.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/users/common/home-manager/zsh.nix b/modules/users/common/home-manager/zsh.nix index acbaee2..d4cd026 100644 --- a/modules/users/common/home-manager/zsh.nix +++ b/modules/users/common/home-manager/zsh.nix @@ -1,5 +1,5 @@ # Additional ZSH settings via Home Manager -{ pkgs, ... }: +{ ... }: { programs = { # Set up Starship @@ -14,10 +14,13 @@ syntaxHighlighting.enable = true; history.ignoreDups = true; # Do not enter command lines into the history list if they are duplicates of the previous event. initExtra = '' - function set_win_title(){ - echo -ne "\033]0; $(basename "$PWD") \007" - } - precmd_functions+=(set_win_title) + function set_win_title(){ + echo -ne "\033]0; $(basename "$PWD") \007" + } + precmd_functions+=(set_win_title) + + bindkey "^[[1;5C" forward-word + bindkey "^[[1;5D" backward-word ''; }; };