mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
parent
5809608bd2
commit
d37e7bcc25
3 changed files with 16 additions and 7 deletions
|
@ -22,6 +22,9 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
|
||||||
bind $argv \eOC forward-char
|
bind $argv \eOC forward-char
|
||||||
bind $argv \eOD backward-char
|
bind $argv \eOD backward-char
|
||||||
|
|
||||||
|
bind $argv -k ppage beginning-of-history
|
||||||
|
bind $argv -k npage end-of-history
|
||||||
|
|
||||||
# Interaction with the system clipboard.
|
# Interaction with the system clipboard.
|
||||||
bind $argv \cx fish_clipboard_copy
|
bind $argv \cx fish_clipboard_copy
|
||||||
bind $argv \cv fish_clipboard_paste
|
bind $argv \cv fish_clipboard_paste
|
||||||
|
|
|
@ -51,7 +51,7 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
|
||||||
# OS X SnowLeopard doesn't have these keys. Don't show an annoying error message.
|
# OS X SnowLeopard doesn't have these keys. Don't show an annoying error message.
|
||||||
bind $argv -k home beginning-of-line 2>/dev/null
|
bind $argv -k home beginning-of-line 2>/dev/null
|
||||||
bind $argv -k end end-of-line 2>/dev/null
|
bind $argv -k end end-of-line 2>/dev/null
|
||||||
bind $argv \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-delete
|
bind $argv \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
|
||||||
|
|
||||||
bind $argv \ca beginning-of-line
|
bind $argv \ca beginning-of-line
|
||||||
bind $argv \ce end-of-line
|
bind $argv \ce end-of-line
|
||||||
|
@ -72,8 +72,6 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
|
||||||
bind $argv \ef forward-word
|
bind $argv \ef forward-word
|
||||||
bind $argv \e\[1\;5C forward-word
|
bind $argv \e\[1\;5C forward-word
|
||||||
bind $argv \e\[1\;5D backward-word
|
bind $argv \e\[1\;5D backward-word
|
||||||
bind $argv -k ppage beginning-of-history
|
|
||||||
bind $argv -k npage end-of-history
|
|
||||||
bind $argv \e\< beginning-of-buffer
|
bind $argv \e\< beginning-of-buffer
|
||||||
bind $argv \e\> end-of-buffer
|
bind $argv \e\> end-of-buffer
|
||||||
|
|
||||||
|
|
|
@ -110,10 +110,17 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
||||||
bind e forward-char forward-word backward-char
|
bind e forward-char forward-word backward-char
|
||||||
bind E forward-bigword backward-char
|
bind E forward-bigword backward-char
|
||||||
|
|
||||||
bind x delete-char
|
# OS X SnowLeopard doesn't have these keys. Don't show an annoying error message.
|
||||||
bind X backward-delete-char
|
# Vi/Vim doesn't support these keys in insert mode but that seems silly so we do so anyway.
|
||||||
|
bind -M insert -k home beginning-of-line 2>/dev/null
|
||||||
|
bind -M default -k home beginning-of-line 2>/dev/null
|
||||||
|
bind -M insert -k end end-of-line 2>/dev/null
|
||||||
|
bind -M default -k end end-of-line 2>/dev/null
|
||||||
|
|
||||||
bind -k dc delete-char
|
bind -M default x delete-char
|
||||||
|
bind -M default X backward-delete-char
|
||||||
|
bind -M insert -k dc delete-char
|
||||||
|
bind -M default -k dc delete-char
|
||||||
|
|
||||||
# Backspace deletes a char in insert mode, but not in normal/default mode.
|
# Backspace deletes a char in insert mode, but not in normal/default mode.
|
||||||
bind -M insert -k backspace backward-delete-char
|
bind -M insert -k backspace backward-delete-char
|
||||||
|
@ -122,7 +129,8 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
||||||
bind -M default \ch backward-char
|
bind -M default \ch backward-char
|
||||||
bind -M insert \x7f backward-delete-char
|
bind -M insert \x7f backward-delete-char
|
||||||
bind -M default \x7f backward-char
|
bind -M default \x7f backward-char
|
||||||
bind \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-delete
|
bind -M insert \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
|
||||||
|
bind -M default \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
|
||||||
|
|
||||||
bind dd kill-whole-line
|
bind dd kill-whole-line
|
||||||
bind D kill-line
|
bind D kill-line
|
||||||
|
|
Loading…
Reference in a new issue