summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2022-02-23 15:36:49 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2022-02-23 15:36:49 +0900
commit5f385d88e0a786f20c4231b82f250945a6583a17 (patch)
treed8049c216dfc4c633a0c5340deaea27bffd5c664 /shell
parent9cb7a364a31bdb882d873807774bdcf6fad0c9e4 (diff)
[zsh] Set up bindings for all three keymaps: emacs, vicmd, and viins
Fix #2694
Diffstat (limited to 'shell')
-rw-r--r--shell/key-bindings.zsh18
1 files changed, 12 insertions, 6 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index 72d66f57..032cd439 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -65,8 +65,10 @@ fzf-file-widget() {
zle reset-prompt
return $ret
}
-zle -N fzf-file-widget
-bindkey '^T' fzf-file-widget
+zle -N fzf-file-widget
+bindkey -M emacs '^T' fzf-file-widget
+bindkey -M vicmd '^T' fzf-file-widget
+bindkey -M viins '^T' fzf-file-widget
# ALT-C - cd into the selected directory
fzf-cd-widget() {
@@ -86,8 +88,10 @@ fzf-cd-widget() {
zle reset-prompt
return $ret
}
-zle -N fzf-cd-widget
-bindkey '\ec' fzf-cd-widget
+zle -N fzf-cd-widget
+bindkey -M emacs '\ec' fzf-cd-widget
+bindkey -M vicmd '\ec' fzf-cd-widget
+bindkey -M viins '\ec' fzf-cd-widget
# CTRL-R - Paste the selected command from history into the command line
fzf-history-widget() {
@@ -105,8 +109,10 @@ fzf-history-widget() {
zle reset-prompt
return $ret
}
-zle -N fzf-history-widget
-bindkey '^R' fzf-history-widget
+zle -N fzf-history-widget
+bindkey -M emacs '^R' fzf-history-widget
+bindkey -M vicmd '^R' fzf-history-widget
+bindkey -M viins '^R' fzf-history-widget
} always {
eval $__fzf_key_bindings_options