vi mode: bind u/C-r to undo/redo in place of history search (#7908)

This commit is contained in:
Xirui Zhao 2021-04-08 00:06:15 +08:00 committed by Johannes Altmanninger
parent 5750351210
commit 8bbb06bf5c
2 changed files with 3 additions and 2 deletions

View File

@ -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
^^^^^^^^^^^^^^^^

View File

@ -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