From 983ae4898bef001409195e429f0dcd6f07f102e7 Mon Sep 17 00:00:00 2001 From: venus Date: Sun, 5 Jul 2026 01:34:14 -0500 Subject: [PATCH] better keybind support --- zsh.config | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/zsh.config b/zsh.config index eb568fa..a515231 100644 --- a/zsh.config +++ b/zsh.config @@ -46,19 +46,21 @@ HISTCONTROL=ignoreboth # consecutive duplicates & commands starting with space a source <(fzf --zsh) # allow for fzf history widget -# binds +### binds +# vim motions for navigating single lines bindkey "^a" beginning-of-line bindkey "^e" end-of-line -bindkey "^k" kill-line # broken -bindkey "^j" backward-word # broken -bindkey "^k" forward-word # broken +bindkey "^k" kill-line +bindkey "^j" backward-word +bindkey "^k" forward-word bindkey "^H" backward-kill-word -# ctrl J & K for going up and down in prev commands -bindkey "^J" history-search-forward -bindkey "^K" history-search-backward +# alt J & K for going up and down in prev commands bindkey '^R' fzf-history-widget +bindkey "\ej" history-search-forward +bindkey "\ek" history-search-backward bindkey -s '^[[1;5A' "!!^M" +bindkey '^ ' autosuggest-execute #accept and execute autosuggestion # open fff file manager with ctrl f # openfff() { # fff <$TTY @@ -71,11 +73,12 @@ bindkey -s '^[[1;5A' "!!^M" # autosuggestions # requires zsh-autosuggestions -if [ -d "/usr/share/zsh/plugins " ]; then +# if [ -d "/usr/share/zsh/plugins/ " ]; then source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # syntax highlighting # requires zsh-syntax-highlighting package -fi + source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +# fi #setup oh-my-posh shell if [ $TERM = "xterm-kitty" ] || [ $NVIM ]; then @@ -85,5 +88,4 @@ fi # replace cd with zoxide (fzf support for changing dir) eval "$(zoxide init zsh)" -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh