diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cf20c5862..1c0656349 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -40,6 +40,7 @@ Interactive improvements New or improved bindings ^^^^^^^^^^^^^^^^^^^^^^^^ - Pasting in Vi mode puts text in the right place in normal mode (:issue:`7847`). +- Vi mode's ``u`` is bound to ``undo`` instead of ``history-search-backward``, following GNU readline's behavior. Similarly, ``C-r`` is bound to ``redo`` instead of ``history-search-backward``, following Vim (#7908). Improved prompts ^^^^^^^^^^^^^^^^ diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index 5a93b5d00..6835a1173 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -101,8 +101,8 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' bind -s --preset $key beginning-of-line end - bind -s --preset u history-search-backward - bind -s --preset \cr history-search-forward + bind -s --preset u undo + bind -s --preset \cr redo bind -s --preset [ history-token-search-backward bind -s --preset ] history-token-search-forward