Skip to content

Commit

Permalink
Removed unnecessary key_bindings function wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
laughedelic committed Aug 9, 2017
1 parent 3364ff5 commit 1b299fe
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions key_bindings.fish
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
function key_bindings

set -l _pisces_bind_mode default
switch $fish_key_bindings
case 'fish_vi_key_bindings' 'fish_hybrid_key_bindings'
set _pisces_bind_mode insert
end
set -l _pisces_bind_mode default
switch $fish_key_bindings
case 'fish_vi_key_bindings' 'fish_hybrid_key_bindings'
set _pisces_bind_mode insert
end

set -q pisces_pairs
or set -U pisces_pairs '(,)' '[,]' '{,}' '","' "','"
set -q pisces_pairs
or set -U pisces_pairs '(,)' '[,]' '{,}' '","' "','"

for pair in $pisces_pairs
_pisces_bind_pair $_pisces_bind_mode (string split -- ',' $pair)
end
for pair in $pisces_pairs
_pisces_bind_pair $_pisces_bind_mode (string split -- ',' $pair)
end

# normal backspace, also known as \010 or ^H:
bind -M $_pisces_bind_mode \b _pisces_backspace
# Terminal.app sends DEL code on ⌫:
bind -M $_pisces_bind_mode \177 _pisces_backspace
# normal backspace, also known as \010 or ^H:
bind -M $_pisces_bind_mode \b _pisces_backspace
# Terminal.app sends DEL code on ⌫:
bind -M $_pisces_bind_mode \177 _pisces_backspace

# overrides TAB to provide completion of vars before a closing '"'
bind -M $_pisces_bind_mode \t _pisces_complete
end
# overrides TAB to provide completion of vars before a closing '"'
bind -M $_pisces_bind_mode \t _pisces_complete

0 comments on commit 1b299fe

Please sign in to comment.