2020-01-16 17:01:59 -06:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
|
|
|
function fish_user_key_bindings
|
2021-04-14 14:53:02 -05:00
|
|
|
# has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git'
|
|
|
|
|
|
|
|
test -f $HOME/.fzf/shell/key-bindings.fish && source $HOME/.fzf/shell/key-bindings.fish
|
|
|
|
|
2020-01-16 17:01:59 -06:00
|
|
|
fzf_key_bindings
|
2020-01-22 17:25:47 -06:00
|
|
|
fish_vi_key_bindings insert --no-erase
|
2020-01-16 17:01:59 -06:00
|
|
|
|
|
|
|
set vi_esc "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char force-repaint; end"
|
2020-01-20 13:09:31 -06:00
|
|
|
|
2020-01-16 17:01:59 -06:00
|
|
|
bind -M insert jk $vi_esc
|
2021-04-14 14:53:02 -05:00
|
|
|
bind -M insert jK $vi_esc
|
2020-01-16 17:01:59 -06:00
|
|
|
bind -M insert Jk $vi_esc
|
|
|
|
bind -M insert JK $vi_esc
|
|
|
|
bind -M insert jj $vi_esc
|
2021-04-14 14:53:02 -05:00
|
|
|
bind -M insert jJ $vi_esc
|
2020-01-16 17:01:59 -06:00
|
|
|
bind -M insert Jj $vi_esc
|
|
|
|
bind -M insert JJ $vi_esc
|
|
|
|
|
2020-01-17 03:02:53 -06:00
|
|
|
bind -M insert \cp up-or-search
|
|
|
|
bind -M insert \cn down-or-search
|
2020-01-22 17:25:47 -06:00
|
|
|
bind -M insert \ce end-of-line
|
|
|
|
bind -M insert \ca beginning-of-line
|
2020-01-20 14:01:06 -06:00
|
|
|
bind -M insert \cw forward-word
|
2020-03-17 12:37:01 -05:00
|
|
|
|
|
|
|
bind -M insert \cv edit_command_buffer
|
|
|
|
bind -M default \cv edit_command_buffer
|
|
|
|
|
|
|
|
bind -M insert \ee false
|
|
|
|
bind -M insert \ev false
|
|
|
|
bind -M default \ee false
|
|
|
|
bind -M default \ev false
|
2021-03-22 10:47:23 -05:00
|
|
|
|
2021-04-14 14:53:02 -05:00
|
|
|
bind -M insert --erase \ct
|
|
|
|
bind -M default --erase \ct
|
2021-03-22 10:47:23 -05:00
|
|
|
bind --erase \c\t
|
2021-04-14 14:53:02 -05:00
|
|
|
bind --erase \cs
|
2021-03-22 10:47:23 -05:00
|
|
|
bind --erase btab
|
2021-04-14 14:53:02 -05:00
|
|
|
bind --erase --preset -M visual -k btab
|
|
|
|
bind --erase --preset -M insert -k btab
|
|
|
|
bind --erase --preset -M default -k btab
|
|
|
|
bind --erase --preset -k btab
|
|
|
|
bind --erase -M visual -k btab
|
|
|
|
bind --erase -M insert -k btab
|
|
|
|
bind --erase -M default -k btab
|
|
|
|
bind --erase -k btab
|
|
|
|
|
|
|
|
bind --erase \cs
|
|
|
|
bind --erase -M insert \cs
|
|
|
|
bind --erase -M default \cs
|
|
|
|
|
|
|
|
bind -M insert \cs 'tmux info && tmux attach -t default || tmux new-session -s default'
|
|
|
|
bind -M default \cs 'tmux info && tmux attach -t default || tmux new-session -s default'
|
|
|
|
bind -M insert \ct 'tmux info && tmux new-window -t default || tmux new-session -s default'
|
|
|
|
bind -M default \ct 'tmux info && tmux new-window -t default || tmux new-session -s default'
|
2020-01-16 17:01:59 -06:00
|
|
|
end
|