diff --git a/src/shelloracle/shell/shelloracle.zsh b/src/shelloracle/shell/shelloracle.zsh index edf4d71..81e0d8f 100644 --- a/src/shelloracle/shell/shelloracle.zsh +++ b/src/shelloracle/shell/shelloracle.zsh @@ -25,5 +25,9 @@ shelloracle-widget() { # Register the function as a ZLE widget zle -N shelloracle-widget -# Install the ZLE widget as a keyboard shortcut Ctrl+F -bindkey '^F' shelloracle-widget \ No newline at end of file +# Install the ZLE widget as a keyboard shortcut Ctrl+F in every keymap, so it +# works in both emacs mode and vi mode (insert and command), regardless of +# whether `bindkey -v` runs before or after this file is sourced. +bindkey -M emacs '^F' shelloracle-widget +bindkey -M viins '^F' shelloracle-widget +bindkey -M vicmd '^F' shelloracle-widget \ No newline at end of file