I configure zsh
via guix
home-zsh-service-type
service and for some reason some keybinds I have are not working. Here is my home-zsh-service-type
definition,
(service home-zsh-service-type
(home-zsh-configuration
(xdg-flavor? #t)
(environment-variables
`(("HISTFILE" . "$XDG_STATE_HOME/zsh/history")
("HISTSIZE" . "10000")
("SAVEHIST" . "10000")))
(zshenv
(list
(local-file "files/shell/zsh/zshenv")))
(zprofile
(list
(local-file "files/shell/zsh/zprofile")
(mixed-text-file "flatpak-shell-profile"
"source " flatpak "/etc/profile.d/flatpak.sh")
(mixed-text-file "nix-shell-profile"
"source " nix "/etc/profile.d/nix.sh")))
(zshrc
(list
;; (local-file "files/shell/zsh/config")
(local-file "files/shell/zsh/completions")
(mixed-text-file "zshrc"
"\n# direnv hook zsh\n"
"_direnv_hook() {\n"
" trap -- '' SIGINT;\n"
" eval \"$(\"" direnv "/bin/direnv" "\" export zsh)\";\n"
" trap - SIGINT;\n"
"}\n")
(local-file "files/shell/zsh/direnv")
(local-file "files/shell/zsh/aliases")
(local-file "files/shell/zsh/keybinds")
(local-file "files/shell/functions")
(local-file "files/shell/zsh/fzf")
(local-file "files/shell/zsh/prompt")
(local-file "files/shell/zsh/startup")
(local-file "files/shell/zsh/source")
(mixed-text-file "zshrc"
"source " zsh-syntax-highlighting
"/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh")
(mixed-text-file "zshrc"
"source " zsh-history-substring-search
"/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh")
(mixed-text-file "zshrc"
"fpath+=\"${0:A:h}" zsh-completions
"share/zsh/site-functions/\"")
(mixed-text-file "zshrc"
"source " zsh-autosuggestions
"/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh")
(mixed-text-file "zshrc"
"source " zsh-autopair
"/share/zsh/plugins/zsh-autopair/zsh-autopair.zsh")))))
my keybinds are defined in the files/shell/zsh/keybinds
file, which has this,
# Enable searching through history
bindkey '^R' history-incremental-pattern-search-backward
# Home End PgUp PgDown Del Ins
bindkey "^[[H" beginning-of-line
bindkey "^[[4~" end-of-line
bindkey "^[[5~" beginning-of-history
bindkey "^[[6~" end-of-history
bindkey "^[[P" delete-char
bindkey "^[[4h" overwrite-mode
# Ctrl+Left Ctrl+Right
bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word
# Ctrl+Bkspc
bindkey '^H' backward-kill-word
bindkey '^[[M' kill-word
# Edit line in vim buffer ctrl-v
#autoload edit-command-line; zle -N edit-command-line
#bindkey '^v' edit-command-line
# Enter vim buffer from normal mode
#autoload -U edit-command-line && zle -N edit-command-line && bindkey -M vicmd "^v" edit-command-line
# Use vim keys in tab complete menu:
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'left' vi-backward-char
bindkey -M menuselect 'down' vi-down-line-or-history
bindkey -M menuselect 'up' vi-up-line-or-history
bindkey -M menuselect 'right' vi-forward-char
If I copy paste this code in terminal the keybind works fine.
All of these files combined go to my .zshrc
file.