summaryrefslogtreecommitdiffstatshomepage
path: root/zsh/.config
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2023-10-30 13:34:44 -0500
committerToby Vincent <tobyv@tobyvin.dev>2023-10-30 13:34:44 -0500
commitbae07877f5ca8a4f03a145254bc97d44eb8c3086 (patch)
tree52c039534e01dcc0578c32a477cd32aebd367d05 /zsh/.config
parent7116ce45b69cca0aef6cf3617565181c289fe3eb (diff)
feat(zsh): add keymap for transposing arguments
Diffstat (limited to 'zsh/.config')
-rw-r--r--zsh/.config/zsh/.zshrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index c3cf107..7b7da59 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -31,6 +31,11 @@ TRAPUSR1() { rehash }
bindkey -v
bindkey -m 2>/dev/null
+autoload -U select-word-style
+zle -N select-word-style
+select-word-style normal
+zstyle :zle:transpose-words word-style shell
+
# TODO: improve this with terminfo validation
#
# See: https://wiki.archlinux.org/title/Zsh#Key_bindings
@@ -41,6 +46,7 @@ bindkey '^[[4~' end-of-line
bindkey '^[[3~' delete-char
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
+bindkey '^[t' transpose-words
bindkey -M vicmd '^[q' push-line
bindkey -M vicmd '^[[Z' reverse-menu-complete