better keybind support
This commit is contained in:
22
zsh.config
22
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user