diff options
-rw-r--r-- | share/functions/fish_vi_key_bindings.fish | 10 | ||||
-rw-r--r-- | share/functions/fish_vi_mode.fish | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index bdb2bd8a..b6b7494e 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -5,12 +5,10 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' set fish_key_bindings fish_vi_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed return end - # The default escape timeout is 300ms. But for users of Vi bindings that can - # be slightly annoying when trying to switch to Vi "normal" mode. Too, - # vi-mode users are unlikely to use escape-as-meta. So set a much shorter - # timeout in this case. - set -q fish_escape_delay_ms - or set -g fish_escape_delay_ms 10 + # The default escape timeout is 300ms. But for users of Vi bindings that can be slightly + # annoying when trying to switch to Vi "normal" mode. So set a shorter timeout in this case + # unless the user has explicitly set the delay. + set -q fish_escape_delay_ms; or set -g fish_escape_delay_ms 100 set -l init_mode insert set -l eol_keys \$ g\$ \e\[F diff --git a/share/functions/fish_vi_mode.fish b/share/functions/fish_vi_mode.fish index 29ddeb6c..49023055 100644 --- a/share/functions/fish_vi_mode.fish +++ b/share/functions/fish_vi_mode.fish @@ -1,5 +1,6 @@ function fish_vi_mode - echo "This function is deprecated. Please call fish_vi_key_bindings directly" >&2 + echo 'The `fish_vi_mode` function is deprecated.' >&2 + echo 'Please switch to calling `fish_vi_key_bindings`.' >&2 # Turn on vi keybindings set -g fish_key_bindings fish_vi_key_bindings end |