function fish_user_key_bindings # Bind k to Atuin search in vim normal mode if type -q atuin bind -M default k _atuin_bind_up end # Ctrl+Shift+Z -> fg (fzf pick when multiple background jobs) bind -M insert ctrl-shift-z '__fg_select; commandline -f repaint' bind -M default ctrl-shift-z '__fg_select; commandline -f repaint' # Ctrl+Alt+L -> clear and re-run last command bind -M insert ctrl-alt-l '__clear_repeat' bind -M default ctrl-alt-l '__clear_repeat' # Ctrl+Alt+Shift+L -> clear and re-run last command on a timer bind -M insert ctrl-alt-shift-l '__clear_repeat_loop' bind -M default ctrl-alt-shift-l '__clear_repeat_loop' # Palette: switch between utilities / shells (fzf) # Ctrl+Alt+P -> utilities, Ctrl+Alt+S -> shells, Ctrl+Alt+Shift+P -> both bind -M insert ctrl-alt-p 'palette utility; commandline -f repaint' bind -M default ctrl-alt-p 'palette utility; commandline -f repaint' bind -M insert ctrl-alt-s 'palette shell; commandline -f repaint' bind -M default ctrl-alt-s 'palette shell; commandline -f repaint' bind -M insert ctrl-alt-shift-p 'palette both; commandline -f repaint' bind -M default ctrl-alt-shift-p 'palette both; commandline -f repaint' end