Bind ctrl-Z to redo (since ctrl-z is undo)

In addition to the native Emacs undo binding, we also support ctrl-z.
On Linux, ctrl-shift-z alias ctrl-Z is the redo binding according to
https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts Let's bind allow
that.

Unfortunately ctrl-shift and ctrl-alt modified shortcuts on Linux may be
intercepted by the windowing system or the terminal. Only alt-shift seems to be
available reliably (but the shift bit should mean "extend selection" in Emacs).
This commit is contained in:
Johannes Altmanninger
2024-04-19 12:34:15 +02:00
parent 5756fa369f
commit e7347b9581
2 changed files with 2 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ function fish_default_key_bindings -d "emacs-like key binds"
bind --preset $argv ctrl-/ undo
bind --preset $argv ctrl-_ undo # XTerm idiosyncracy, can get rid of this once we go full CSI u
bind --preset $argv ctrl-z undo
bind --preset $argv ctrl-Z redo
bind --preset $argv alt-/ redo
bind --preset $argv alt-t transpose-words
bind --preset $argv alt-u upcase-word