diff --git a/zsh/dot-zshrc b/zsh/dot-zshrc index b8ac024..5b304b7 100644 --- a/zsh/dot-zshrc +++ b/zsh/dot-zshrc @@ -124,3 +124,17 @@ export _ZO_FZF_OPTS="--tmux" if hash zoxide 2>/dev/null; then eval "$(zoxide init zsh --cmd cd)" fi + +# Generate missing text objects +autoload -Uz select-bracketed select-quoted +zle -N select-quoted +zle -N select-bracketed +for km in viopp visual; do + bindkey -M $km -- '-' vi-up-line-or-history + for c in {a,i}${(s..)^:-\'\"\`\|,./:;=+@}; do + bindkey -M $km $c select-quoted + done + for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do + bindkey -M $km $c select-bracketed + done +done