Bind undo to Control-Z in addition to Control-/

See #7152
This commit is contained in:
Johannes Altmanninger 2020-06-29 21:31:29 +02:00
parent 4f796df87c
commit 8b961a0ca8
3 changed files with 4 additions and 4 deletions

View File

@ -85,9 +85,8 @@ Interactive improvements
New or improved bindings
^^^^^^^^^^^^^^^^^^^^^^^^
- New readline commands ``undo`` (Ctrl+_) and ``redo`` (Alt-/) can be
used to revert changes to the command line or the pager search field
(#6570).
- New readline commands ``undo`` (Ctrl+_ or Ctrl+Z) and ``redo`` (Alt-/) can be used to revert
changes to the command line or the pager search field (#6570).
- New function ``__fish_preview_current_file`` (Alt+O) opens the
current file at the cursor in a pager (#6838).
- ``edit_command_buffer`` (Alt-E and Alt-V) passes the cursor position

View File

@ -1478,7 +1478,7 @@ Emacs mode commands
- :kbd:`Alt`\ +\ :kbd:`T` transposes the last two words.
- :kbd:`Control`\ +\ :kbd:`_` (:kbd:`Control`\ +\ :kbd:`/` on some terminals) undoes the most recent edit of the line.
- :kbd:`Control`\ +\ :kbd:`Z`, :kbd:`Control`\ +\ :kbd:`_` (:kbd:`Control`\ +\ :kbd:`/` on some terminals) undo the most recent edit of the line.
- :kbd:`Alt`\ +\ :kbd:`/` reverts the most recent undo.

View File

@ -80,6 +80,7 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
bind --preset $argv \cb backward-char
bind --preset $argv \ct transpose-chars
bind --preset $argv \c_ undo
bind --preset $argv \cz undo
bind --preset $argv \e/ redo
bind --preset $argv \et transpose-words
bind --preset $argv \eu upcase-word