mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 18:51:15 -03:00
{forward,backward}-bigword on Shift-Left/Right
There was no way to do this at all without vi keybindings, and it turns out shift-left/shift-right was available. Fixes #1605
This commit is contained in:
@@ -1097,7 +1097,9 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
|
|||||||
|
|
||||||
- @key{Tab} <a href="#completion">completes</a> the current token. @key{Shift, Tab} completes the current token and starts the pager's search mode.
|
- @key{Tab} <a href="#completion">completes</a> the current token. @key{Shift, Tab} completes the current token and starts the pager's search mode.
|
||||||
|
|
||||||
- @key{Alt,←,Left} and @key{Alt,→,Right} move the cursor one word 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, @key{Alt,→,Right} (or @key{Alt,F}) accepts the first word in the suggestion.
|
- @key{Alt,←,Left} and @key{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, @key{Alt,→,Right} (or @key{Alt,F}) accepts the first word in the suggestion.
|
||||||
|
|
||||||
|
- @key{Shift,←,Left} and @key{Shift,→,Right} move the cursor one word left or right, without stopping on punctuation.
|
||||||
|
|
||||||
- @cursor_key{↑,Up} and @cursor_key{↓,Down} (or @key{Control,P} and @key{Control,N} for emacs aficionados) search the command history for the previous/next command containing the string that was specified on the commandline before the search was started. If the commandline was empty when the search started, all commands match. See the <a href='#history'>history</a> section for more information on history searching.
|
- @cursor_key{↑,Up} and @cursor_key{↓,Down} (or @key{Control,P} and @key{Control,N} for emacs aficionados) search the command history for the previous/next command containing the string that was specified on the commandline before the search was started. If the commandline was empty when the search started, all commands match. See the <a href='#history'>history</a> section for more information on history searching.
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
|
|||||||
bind --preset $argv \eOA up-or-search
|
bind --preset $argv \eOA up-or-search
|
||||||
bind --preset $argv \eOB down-or-search
|
bind --preset $argv \eOB down-or-search
|
||||||
|
|
||||||
|
bind --preset $argv -k sright forward-bigword
|
||||||
|
bind --preset $argv -k sleft backward-bigword
|
||||||
|
|
||||||
# Alt-left/Alt-right
|
# Alt-left/Alt-right
|
||||||
bind --preset $argv \e\eOC nextd-or-forward-word
|
bind --preset $argv \e\eOC nextd-or-forward-word
|
||||||
bind --preset $argv \e\eOD prevd-or-backward-word
|
bind --preset $argv \e\eOD prevd-or-backward-word
|
||||||
|
|||||||
Reference in New Issue
Block a user