How to use vi mode in fish shell?

sandric picture sandric · Feb 11, 2015 · Viewed 30.2k times · Source

I saw vi-mode implementation for fish shell here, but I have no clue how to use it. Is there any tutorial available online (I couldn't find such) describing basic functionality - how to switch modes etc. thanks.

Answer

ridiculous_fish picture ridiculous_fish · Feb 11, 2015

In fish 2.3.0 and later:

  • Run fish_vi_key_bindings to start vi mode
  • Run fish_default_key_bindings to go back to default mode

If you want to make it the default, add the fish_vi_key_bindings command to ~/.config/fish/config.fish.