FISH_VI_KEY_BINDINGS(1)
πΈ FISH_VI_KEY_BINDINGS(1) πΈ
okay bestie, so this is a page from the fish-shell manual, and it's literally the glow-up that turns your shell into vim. buckle up π
β¨ NAME β¨
fish_vi_key_bindings β set vi key bindings for fish
β¨ SYNOPSIS β¨
fish_vi_key_bindings
fish_vi_key_bindings [--no-erase] [INIT_MODE]
β¨ DESCRIPTION β¨
okay so fish_vi_key_bindings sets the vi key bindings for the fish shell. that's it, that's the whole vibe. π¦
if you hand it a valid INIT_MODE β and the valid ones are insert, default, and visual β then that mode becomes the default mode. if you don't give it an INIT_MODE at all? no stress, the mode just defaults to insert mode. slay. π
the following parameters are available:
--no-eraseβ does not clear previous set bindings. like, it leaves your old bindings exactly where they are instead of wiping them. π
heads up, there's more info waiting for you on how to use vi mode over at the vi mode section (#vi-mode). iykyk π₯
β¨ DIFFERENCES FROM VIM β¨
fish's vi mode is lowkey designed to feel familiar to vim users, but there are some differences, and we're gonna be honest about them:
π«Ά Word character handling
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. one word. one unit. no cap.
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. π it's giving tiny betrayal, but now you know, so we move. β¨
β¨ EXAMPLES β¨
to start using vi key bindings, literally just run:
fish_vi_key_bindings
or, if you want it permanent, set set -g fish_key_bindings fish_vi_key_bindings in config.fish (more on that in the configuration section, #configuration). π§ set it and forget it, iconic behavior honestly. π
β¨ Copyright β¨
fish-shell developers
and that's the whole page, bestie! π«Ά this was from the fish-shell manual, version 4.9, dated Sep 08, 2026 β go forth and w your way through the shell. πππ
π¦ where this page comes from
- arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms