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?
To enable vi mode, use fish_vi_key_bindings . When in vi-mode, the fish_mode_prompt function will display a mode indicator to the left of the prompt.
The bash shell (again, via GNU Readline) is able to provide this functionality for us. In order to enable it, you run the command $ set -o vi.
If you wish to use fish (or any other shell) as your default shell, you need to enter your new shell's executable /usr/local/bin/fish in two places: add /usr/local/bin/fish to /etc/shells. change your default shell with chsh -s to /usr/local/bin/fish.
In fish 2.3.0
and later:
fish_vi_key_bindings
to start vi modefish_default_key_bindings
to go back to default modeIf you want to make it the default, add the fish_vi_key_bindings
command to ~/.config/fish/config.fish
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With