function fish_user_key_bindings
  # Use Emacs and Vim modes at the same time
  # vi-bindings take precedence when there's a conflict
  fish_default_key_bindings -M insert
  fish_vi_key_bindings --no-erase insert

  # Use fzf for <Ctrl+R>, <Ctrl+T>, <Alt+C>
  status is-interactive; and fzf_key_bindings

  # Equal to <Alt+↓> and <Alt+↑>
  bind -M insert \ej history-token-search-forward
  bind -M insert \ek history-token-search-backward
end
