better keybind support

This commit is contained in:
venus
2026-07-05 01:34:14 -05:00
parent f17e3d05ef
commit 983ae4898b

View File

@@ -46,19 +46,21 @@ HISTCONTROL=ignoreboth # consecutive duplicates & commands starting with space a
source <(fzf --zsh) # allow for fzf history widget source <(fzf --zsh) # allow for fzf history widget
# binds ### binds
# vim motions for navigating single lines
bindkey "^a" beginning-of-line bindkey "^a" beginning-of-line
bindkey "^e" end-of-line bindkey "^e" end-of-line
bindkey "^k" kill-line # broken bindkey "^k" kill-line
bindkey "^j" backward-word # broken bindkey "^j" backward-word
bindkey "^k" forward-word # broken bindkey "^k" forward-word
bindkey "^H" backward-kill-word bindkey "^H" backward-kill-word
# ctrl J & K for going up and down in prev commands # alt J & K for going up and down in prev commands
bindkey "^J" history-search-forward
bindkey "^K" history-search-backward
bindkey '^R' fzf-history-widget bindkey '^R' fzf-history-widget
bindkey "\ej" history-search-forward
bindkey "\ek" history-search-backward
bindkey -s '^[[1;5A' "!!^M" bindkey -s '^[[1;5A' "!!^M"
bindkey '^ ' autosuggest-execute #accept and execute autosuggestion
# open fff file manager with ctrl f # open fff file manager with ctrl f
# openfff() { # openfff() {
# fff <$TTY # fff <$TTY
@@ -71,11 +73,12 @@ bindkey -s '^[[1;5A' "!!^M"
# autosuggestions # autosuggestions
# requires zsh-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 source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# syntax highlighting # syntax highlighting
# requires zsh-syntax-highlighting package # requires zsh-syntax-highlighting package
fi source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# fi
#setup oh-my-posh shell #setup oh-my-posh shell
if [ $TERM = "xterm-kitty" ] || [ $NVIM ]; then if [ $TERM = "xterm-kitty" ] || [ $NVIM ]; then
@@ -85,5 +88,4 @@ fi
# replace cd with zoxide (fzf support for changing dir) # replace cd with zoxide (fzf support for changing dir)
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh