From 69ce2af88d65cf2757ebdcaaeb99ae64b4d0f720 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 3 Jan 2023 07:59:00 +0100 Subject: [PATCH] Add further text objects to zsh From: https://thevaluable.dev/zsh-install-configure-mouseless/ --- home/files/zshrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/home/files/zshrc b/home/files/zshrc index 50e3fb7..c629593 100644 --- a/home/files/zshrc +++ b/home/files/zshrc @@ -25,6 +25,19 @@ bindkey -M menuselect 'k' vi-up-line-or-history bindkey -M menuselect 'l' vi-forward-char bindkey -M menuselect 'j' vi-down-line-or-history +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 + # also complete defined alias setopt completealiases # Correct mistyped commands