about summary refs log tree commit diff stats
path: root/modules/by-name/zs/zsh/config/keymaps/visual.zsh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-21 22:39:32 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-21 22:39:32 +0200
commit67fc567939eec10fcea47cd3569d1682698a5724 (patch)
tree5b7e6381822de15020de6cee73969acb630f78a1 /modules/by-name/zs/zsh/config/keymaps/visual.zsh
parentbuild(treewide): Update (diff)
downloadnixos-config-67fc567939eec10fcea47cd3569d1682698a5724.tar.gz
nixos-config-67fc567939eec10fcea47cd3569d1682698a5724.zip
feat(modules/zsh): Nearly completely rewrite
New features:
  - The `vi` mode is now actually useful
  - The whole history search/suggestion has been integrated into `atuin`
  - The `edit-command-line` plugin does no longer print useless stuff
  - and miscellaneous other things.
Diffstat (limited to 'modules/by-name/zs/zsh/config/keymaps/visual.zsh')
-rw-r--r--modules/by-name/zs/zsh/config/keymaps/visual.zsh53
1 files changed, 53 insertions, 0 deletions
diff --git a/modules/by-name/zs/zsh/config/keymaps/visual.zsh b/modules/by-name/zs/zsh/config/keymaps/visual.zsh
new file mode 100644
index 00000000..c09cd578
--- /dev/null
+++ b/modules/by-name/zs/zsh/config/keymaps/visual.zsh
@@ -0,0 +1,53 @@
+bindkey -N visual
+
+bindkey -M visual "^[" deactivate-region
+
+bindkey -M visual "t" down-line
+bindkey -M visual "n" up-line
+
+bindkey -M visual "o" exchange-point-and-mark
+bindkey -M visual "p" put-replace-selection
+
+
+bindkey -M visual "x" vi-delete
+bindkey -M visual "u" vi-down-case
+bindkey -M visual "~" vi-oper-swap-case
+bindkey -M visual "U" vi-up-case
+
+
+bindkey -M visual "aW" select-a-blank-word
+bindkey -M visual "aa" select-a-shell-word
+bindkey -M visual "aw" select-a-word
+
+bindkey -M visual "iW" select-in-blank-word
+bindkey -M visual "ia" select-in-shell-word
+bindkey -M visual "iw" select-in-word
+
+
+bindkey -M visual "a(" select-bracketed
+bindkey -M visual "a)" select-bracketed
+bindkey -M visual "a<" select-bracketed
+bindkey -M visual "a>" select-bracketed
+bindkey -M visual "aB" select-bracketed
+bindkey -M visual "a[" select-bracketed
+bindkey -M visual "a]" select-bracketed
+bindkey -M visual "ab" select-bracketed
+bindkey -M visual "a{" select-bracketed
+bindkey -M visual "a}" select-bracketed
+bindkey -M visual "i(" select-bracketed
+bindkey -M visual "i)" select-bracketed
+bindkey -M visual "i<" select-bracketed
+bindkey -M visual "i>" select-bracketed
+bindkey -M visual "iB" select-bracketed
+bindkey -M visual "i[" select-bracketed
+bindkey -M visual "i]" select-bracketed
+bindkey -M visual "ib" select-bracketed
+bindkey -M visual "i{" select-bracketed
+bindkey -M visual "i}" select-bracketed
+
+bindkey -M visual "a'" select-quoted
+bindkey -M visual "a\"" select-quoted
+bindkey -M visual "a\`" select-quoted
+bindkey -M visual "i'" select-quoted
+bindkey -M visual "i\"" select-quoted
+bindkey -M visual "i\`" select-quoted