about summary refs log tree commit diff stats
path: root/nix-conf/home
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-11-07 13:08:56 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-11-07 13:08:56 +0000
commitba35d6cacc99e559c468e4a15dd8a08bdf1dc380 (patch)
tree60de390b5cdeadb5ad5ff40d56fbe1919c660b51 /nix-conf/home
parent37f9c483f569c8ddf69df364f0cb8d5e334efcc4 (diff)
downloaddotfiles-ba35d6cacc99e559c468e4a15dd8a08bdf1dc380.tar.gz
Make home and end keys work
Diffstat (limited to 'nix-conf/home')
-rw-r--r--nix-conf/home/includes/zsh.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nix-conf/home/includes/zsh.nix b/nix-conf/home/includes/zsh.nix
index 2775fe0..ea10955 100644
--- a/nix-conf/home/includes/zsh.nix
+++ b/nix-conf/home/includes/zsh.nix
@@ -95,6 +95,11 @@
       bindkey '^[[A' history-substring-search-up
       bindkey '^[[B' history-substring-search-down
 
+      # TODO should we use something based on ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} ?
+      # make home and end work
+      [[ -z "$terminfo[khome]" ]] || bindkey -M emacs "$terminfo[khome]" beginning-of-line
+      [[ -z "$terminfo[khome]" ]] || bindkey -M emacs "$terminfo[khome]" beginning-of-line
+
       # disable sort when completing `git checkout`
       zstyle ''\':completion:*:git-checkout:*''\' sort false
       # set descriptions format to enable group support