mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Document ctrl-backspace and bind ctrl-delete as well
This has a slightly different behavior than what the CUA user expects: it fails to eat up trailing spaces. We should probably fix this.
This commit is contained in:
parent
904649c5c5
commit
2e9de57fd7
3 changed files with 4 additions and 2 deletions
|
@ -178,6 +178,7 @@ New or improved bindings
|
|||
- The following keys have refined behavior if the terminal supports `disambiguating them <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`_:
|
||||
- :kbd:`shift-enter` now inserts a newline instead of executing the command line.
|
||||
- :kbd:`ctrl-backspace` now deletes the last word instead of only one character.
|
||||
- :kbd:`ctrl-delete` deletes the next word (same as :kbd:`alt-d`).
|
||||
- New special input functions ``forward-char-passive`` and ``backward-char-passive`` are like their non-passive variants but do not accept autosuggestions or move focus in the completion pager (:issue:`10398`).
|
||||
- Vi mode has seen some improvements but continues to suffer from the lack of people working on it.
|
||||
- Insert-mode :kbd:`ctrl-n` accepts autosuggestions (:issue:`10339`).
|
||||
|
|
|
@ -325,7 +325,7 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit
|
|||
|
||||
- :kbd:`ctrl-x` copies the current buffer to the system's clipboard, :kbd:`ctrl-v` inserts the clipboard contents. (see :doc:`fish_clipboard_copy <cmds/fish_clipboard_copy>` and :doc:`fish_clipboard_paste <cmds/fish_clipboard_paste>`)
|
||||
|
||||
- :kbd:`alt-d` moves the next word to the :ref:`killring`.
|
||||
- :kbd:`alt-d` or :kbd:`ctrl-delete` moves the next word to the :ref:`killring`.
|
||||
|
||||
- :kbd:`alt-h` (or :kbd:`f1`) shows the manual page for the current command, if one exists.
|
||||
|
||||
|
@ -362,7 +362,7 @@ To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key
|
|||
|
||||
- :kbd:`delete` or :kbd:`backspace` removes one character forwards or backwards respectively. This also goes for :kbd:`ctrl-h`, which is indistinguishable from backspace.
|
||||
|
||||
- :kbd:`alt-backspace` removes one word backwards.
|
||||
- :kbd:`alt-backspace` removes one word backwards. If supported by the terminal, :kbd:`ctrl-backspace` does the same.
|
||||
|
||||
- :kbd:`alt-<` moves to the beginning of the commandline, :kbd:`alt->` moves to the end.
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ function fish_default_key_bindings -d "emacs-like key binds"
|
|||
bind --preset $argv alt-c capitalize-word
|
||||
bind --preset $argv alt-backspace backward-kill-word
|
||||
bind --preset $argv ctrl-backspace backward-kill-word
|
||||
bind --preset $argv ctrl-delete kill-word
|
||||
bind --preset $argv alt-b backward-word
|
||||
bind --preset $argv alt-f forward-word
|
||||
if test "$TERM_PROGRAM" = Apple_Terminal
|
||||
|
|
Loading…
Reference in a new issue