OS Manuals

fish_vi_key_bindings(1)

fish_vi_key_bindings - set vi key bindings for fish

FISH_VI_KEY_BINDINGS(1) fish-shell FISH_VI_KEY_BINDINGS(1)

fish_vi_key_bindings - set vi key bindings for fish

fish_vi_key_bindings
fish_vi_key_bindings [--no-erase] [INIT_MODE]

fish_vi_key_bindings sets the vi key bindings for fish shell.

If a valid INIT_MODE is provided (insert, default, visual), then that mode will become the default . If no INIT_MODE is given, the mode defaults to insert mode.

The following parameters are available:

Does not clear previous set bindings

Further information on how to use vi mode <#vi-mode>.

fish's vi mode aims to be familiar to vim users, but there are some differences:

In vim, underscore (_) is treated as a keyword character by default, so word motions like w, b, and e treat foo_bar as a single word. In fish, underscore is treated as punctuation, so word motions stop at underscores. For example, pressing w on foo_bar in fish stops at the _, while in vim it would jump past the entire identifier.

To start using vi key bindings:

fish_vi_key_bindings


or set -g fish_key_bindings fish_vi_key_bindings in config.fish <#configuration>.

fish-shell developers

October 26, 2026 4.9

fish 4.9.3-r4 · os · ingested 2026-10-27