Make Ctrl-x autocomplete suggestions; cosmetics

This commit is contained in:
Julian Aron Prenner 2014-01-20 13:07:32 +01:00
parent 7df4a966ea
commit 44c6fa68cf
2 changed files with 222 additions and 225 deletions

View file

@ -4,10 +4,6 @@ function fish_vi_key_bindings -d "vi-like key bindings for fish"
##
## command mode
##
#bind -m command : force-repaint
#bind -M command q exit
#bind -M command -m default \e force-repaint
#bind -M command -m default \cc force-repaint
bind :q exit
@ -42,12 +38,6 @@ function fish_vi_key_bindings -d "vi-like key bindings for fish"
bind \e\[H beginning-of-line
bind \e\[F end-of-line
# NOTE: history-search-backward and history-search-forward
# must both be bound for `commandline -f ...' to work, and thus for up-or-search
# and down-or-search to work, since those are actually
# simple shell functions that use `commandline -f ...'.
# Generally, commandline -f can only invoke functions that have been bound previously
bind u history-search-backward
bind \cr history-search-forward
@ -163,6 +153,13 @@ function fish_vi_key_bindings -d "vi-like key bindings for fish"
bind -M insert \t complete
# OS X SnowLeopard doesn't have these keys. Don't show an annoying error message.
bind -M insert -k home beginning-of-line 2> /dev/null
bind -M insert -k end end-of-line 2> /dev/null
bind -M insert \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-delete
bind -M insert \cx end-of-line
bind -M insert \e\[A up-or-search
bind -M insert \e\[B down-or-search
bind -M insert -k down down-or-search
@ -194,11 +191,11 @@ function fish_vi_key_bindings -d "vi-like key bindings for fish"
bind -M visual l forward-char
bind -M visual b backward-word
bind B backward-word
bind gE backward-word
bind gE backward-word
bind w forward-word
bind W forward-word
bind -M visual B backward-word
bind -M visual gE backward-word
bind -M visual gE backward-word
bind -M visual w forward-word
bind -M visual W forward-word
bind -M visual e forward-word
bind -M visual E forward-word