diff --git a/doc_src/interactive.rst b/doc_src/interactive.rst index bf04f397c..28bc55157 100644 --- a/doc_src/interactive.rst +++ b/doc_src/interactive.rst @@ -303,7 +303,7 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit - :kbd:`alt-enter` inserts a newline at the cursor position. This is useful to add a line to a commandline that's already complete. -- :kbd:`alt-left` (``←``) and :kbd:`alt-right` (``→``) move the cursor one argument left or right, or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (``→``) (or :kbd:`alt-f`) accepts the first argument in the suggestion. +- :kbd:`alt-left` (``←``) and :kbd:`alt-right` (``→``) move the cursor one word left or right (to the next space or punctuation mark), or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (``→``) (or :kbd:`alt-f`) accepts the first word in the suggestion. - :kbd:`ctrl-left` (``←``) and :kbd:`ctrl-right` (``→``) move the cursor one word left or right. These accept one word of the autosuggestion - the part they'd move over. @@ -370,7 +370,7 @@ To enable emacs mode, use :doc:`fish_default_key_bindings ` moves to the end. diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index 2677edda5..448b64441 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -54,8 +54,8 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod $legacy_bind --preset $argv -k sright forward-bigword $legacy_bind --preset $argv -k sleft backward-bigword - bind --preset $argv alt-right nextd-or-forward-token - bind --preset $argv alt-left prevd-or-backward-token + bind --preset $argv alt-right nextd-or-forward-word + bind --preset $argv alt-left prevd-or-backward-word bind --preset $argv alt-up history-token-search-backward bind --preset $argv alt-down history-token-search-forward diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish index 86190acff..9dadf056f 100644 --- a/share/functions/fish_default_key_bindings.fish +++ b/share/functions/fish_default_key_bindings.fish @@ -55,9 +55,8 @@ function fish_default_key_bindings -d "emacs-like key binds" bind --preset $argv alt-u upcase-word bind --preset $argv alt-c capitalize-word - bind --preset $argv alt-backspace backward-kill-token + bind --preset $argv alt-backspace backward-kill-word bind --preset $argv ctrl-backspace backward-kill-word - bind --preset $argv alt-delete kill-token bind --preset $argv ctrl-delete kill-word bind --preset $argv alt-b prevd-or-backward-word bind --preset $argv alt-f nextd-or-forward-word