mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
parent
6b1801063b
commit
1bc887cd9f
3 changed files with 7 additions and 5 deletions
|
@ -74,6 +74,9 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
|
|||
bind $argv \cc __fish_cancel_commandline
|
||||
bind $argv \cu backward-kill-line
|
||||
bind $argv \cw backward-kill-path-component
|
||||
bind $argv \e\[F end-of-line
|
||||
bind $argv \e\[H beginning-of-line
|
||||
|
||||
bind $argv \ed 'set -l cmd (commandline); if test -z "$cmd"; echo; dirh; commandline -f repaint; else; commandline -f kill-word; end'
|
||||
bind $argv \cd delete-or-exit
|
||||
|
||||
|
|
|
@ -33,9 +33,6 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
|
|||
bind $argv -k backspace backward-delete-char
|
||||
bind $argv \x7f backward-delete-char
|
||||
|
||||
bind $argv \e\[H beginning-of-line
|
||||
bind $argv \e\[F end-of-line
|
||||
|
||||
# for PuTTY
|
||||
# https://github.com/fish-shell/fish-shell/issues/180
|
||||
bind $argv \e\[1~ beginning-of-line
|
||||
|
|
|
@ -18,8 +18,10 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
|||
set -q fish_escape_delay_ms; or set -g fish_escape_delay_ms 100
|
||||
|
||||
set -l init_mode insert
|
||||
set -l eol_keys \$ g\$ \e\[F
|
||||
set -l bol_keys \^ 0 g\^ \e\[H
|
||||
# These are only the special vi-style keys
|
||||
# not end/home, we share those.
|
||||
set -l eol_keys \$ g\$
|
||||
set -l bol_keys \^ 0 g\^
|
||||
if set -q argv[1]
|
||||
set init_mode $argv[1]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue