Browse code
refactor(zsh): cleanup and centralize keybindings
Edward Langley authored on 22/03/2023 01:52:16
Showing 3 changed files
Showing 3 changed files
- zsh/zsh_plugins/01-help.zsh
- zsh/zsh_plugins/99-zle.zsh
- zsh/zsh_plugins/dependencies/key-bindings.zsh
... | ... |
@@ -24,6 +24,8 @@ bindkey -M vicmd '^X^e' edit-command-line |
24 | 24 |
bindkey -M viins '^I' complete-word |
25 | 25 |
bindkey -M viins '^Oc' _correct_word |
26 | 26 |
bindkey -M viins '^O?' _complete_debug |
27 |
+bindkey -M viins '^_' run-help |
|
28 |
+bindkey -M vicmd '^_' run-help |
|
27 | 29 |
|
28 | 30 |
# detecting the terminal to get the keybindings right |
29 | 31 |
# TODO: check if obsoleted by other things |
... | ... |
@@ -50,3 +52,11 @@ bindkey '[3~' delete-char |
50 | 52 |
|
51 | 53 |
export KEYTIMEOUT=1 |
52 | 54 |
|
55 |
+autoload -Uz surround |
|
56 |
+zle -N delete-surround surround |
|
57 |
+zle -N add-surround surround |
|
58 |
+zle -N change-surround surround |
|
59 |
+bindkey -a cs change-surround |
|
60 |
+bindkey -a ds delete-surround |
|
61 |
+bindkey -a ys add-surround |
|
62 |
+bindkey -M visual S add-surround |