This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/fish/key-bindings.fish
2023-01-01 21:46:44 -06:00

24 lines
838 B
Fish

function fish_user_key_bindings
command -q sk && functions | grep skim_key_bindings &>/dev/null && skim_key_bindings
fish_vi_key_bindings insert --no-erase
# bind "jk" from insert mode to return to normal mode
set normal_mode "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char force-repaint; end"
bind -M insert jk $normal_mode
bind -M insert jK $normal_mode
bind -M insert Jk $normal_mode
bind -M insert JK $normal_mode
bind -M insert jj $normal_mode
bind -M insert jJ $normal_mode
bind -M insert Jj $normal_mode
bind -M insert JJ $normal_mode
bind -M insert \cp up-or-search
bind -M insert \cn down-or-search
bind -M insert \ce end-of-line
bind -M insert \ca beginning-of-line
bind -M insert \cv edit_command_buffer
bind -M default \cv edit_command_buffer
end