When I use on Linux Mint my Fish Shell, using the Ctrl- or Ctrl- keys isn't moving the cursor to the previous or next word. It switches between an I and an N instead:

Here is the I and then the N

I cannot do partial completion then, so it's really annoying.

How can I fix this?

Output of bind | grep backward-word bind | grep backward-word

  • Hi there, I have this on fish shell. When I go on bash it works properly.
    – user220817
    Commented Mar 14, 2017 at 13:49

2 Answers 2


Your key binding configuration seems to be missing entries for \e[1;5C and \e[1;5D which are the sequences of characters typically sent upon pressing Ctrl- and Ctrl- in many xterm-like terminal emulators.

You can add those in your ~/.config/fish/config.fish

bind \e\[1\;5C forward-word
bind \e\[1\;5D backward-word

That has been in fish's default key binding since 2.0 (this commit in 2010), you may want to upgrade.

  • Okay it kind of works but and I've got a fish 2.5... that's why I don't really get the problem... There is maybe some interference... Usually I could navigate trough pre completion but yet it's not the case... Thanks a lot..
    – user220817
    Commented Mar 14, 2017 at 15:51
  • @Marc, is it possible that you've overridden the key binding configuration somehow in ~/.config/fish? grep -r bind ~/.config/fish Commented Mar 14, 2017 at 16:20
  • @marc, Do those lines show-up in /usr/share/fish/functions/fish_default_key_bindings.fish? Commented Mar 14, 2017 at 16:21
  • thanks a lot for your comments. So yes these lines are in /usr/share/fish/functions/fish_default_key_bindings.fish: bind $argv \e[1\;5C forward-word bind $argv \e[1\;5D backward-word
    – user220817
    Commented Mar 15, 2017 at 13:09
  • @Marc, but get overridden somehow. Somewhere in ~/.config/fish? Try running strace -fo log -e open fish. And look in the log for files that fish opens and if any of them contain key binding instructions. Commented Mar 15, 2017 at 13:21

In fact it was the key bindings that where set to vi.

This command solved my issue: set -U fish_key_bindings fish_default_key_bindings

You must log in to answer this question.