How to use vi mode in fish shell?

VimViFish

Vim Problem Overview


I saw vi-mode implementation for fish shell, but I have no clue how to use it. Is there any tutorial available online describing basic functionality, e.g. how to switch modes?

Vim Solutions


Solution 1 - Vim

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.

Solution 2 - Vim

I am using fish 2.2.0. The following worked for me:

Edit $HOME/.config/fish/functions/fish_user_key_bindings.fish

function fish_user_key_bindings
  fish_vi_key_bindings
end

via this

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsandricView Question on Stackoverflow
Solution 1 - Vimridiculous_fishView Answer on Stackoverflow
Solution 2 - Vimamit kumarView Answer on Stackoverflow