diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index 36dc582fb..9cbe8a66a 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -186,6 +186,10 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod bind --preset $argv "&" self-insert expand-abbr bind --preset $argv ">" self-insert expand-abbr bind --preset $argv "<" self-insert expand-abbr + # Shift+Return as sent with XTerm.vt100.formatOtherKeys: 0 + bind --preset $argv \e\[27\;2\;13~ "commandline -f expand-abbr; commandline -i \n" + # Shift+Return CSI u sequence, sent with XTerm.vt100.formatOtherKeys: 1 + bind --preset $argv \e\[13\;2u "commandline -f expand-abbr; commandline -i \n" # Closing a command substitution expands abbreviations bind --preset $argv ")" self-insert expand-abbr # Ctrl-space inserts space without expanding abbrs @@ -198,9 +202,6 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod # Make Control+Return behave like Return because it's easy to mistype after accepting an autosuggestion. bind --preset $argv \e\[27\;5\;13~ execute # Sent with XTerm.vt100.formatOtherKeys: 0 bind --preset $argv \e\[13\;5u execute # CSI u sequence, sent with XTerm.vt100.formatOtherKeys: 1 - # Same for Shift+Return - bind --preset $argv \e\[27\;2\;13~ execute - bind --preset $argv \e\[13\;2u execute end end