mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-20 22:27:08 +08:00
Simplify space binding and fix search
With the new support for self-insert inserting a bound sequence, the default binding for space as expanding abbreviations can be simplified to just `self-insert expand-abbr`. This also fixes the bug where space would cancel pager search.
This commit is contained in:
parent
18b56637f7
commit
e1f46d22de
@ -32,7 +32,7 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
|
||||
or exit # protect against invalid $argv
|
||||
|
||||
# Space expands abbrs _and_ inserts itself.
|
||||
bind --preset $argv " " 'commandline -i " "; commandline -f expand-abbr'
|
||||
bind --preset $argv " " self-insert expand-abbr
|
||||
|
||||
bind --preset $argv \n execute
|
||||
bind --preset $argv \r execute
|
||||
|
@ -55,7 +55,7 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
||||
|
||||
bind -s --preset -M insert "" self-insert
|
||||
# Space expands abbrs _and_ inserts itself.
|
||||
bind -s --preset -M insert " " 'commandline -i " "; commandline -f expand-abbr'
|
||||
bind -s --preset -M insert " " self-insert expand-abbr
|
||||
|
||||
# Add a way to switch from insert to normal (command) mode.
|
||||
# Note if we are paging, we want to stay in insert mode
|
||||
|
Loading…
x
Reference in New Issue
Block a user