Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using terminator along with fish and I want to use Alt-Left etc for navigating terminator and Ctrl-Left and Ctrl-right to move the cursor by word. The problem is when I do

bind \cleft backward-word

it doesn't change the behavior of of Ctrl-left or right. This seems to follow what the documentation and I pulled the key and the command from the -K and -f flags and

bind -a

shows that the bindings exists.

I've used the same command for other sequences, but I can't get this one to work. Am I missing something?

share|improve this question

The accepted answer is almost worked, but I found I can't make it auto bind the keys through file. I endup modify the (which under /usr/share/fish/functions) directly.

Also, just adding ctrl-left and ctrl-right to normal mode under vi keybind is not enough, have to add insert and visual mode also.

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

Sorry for this should be a comment to the accepted answer, not an independent answer, but due to I don't have sufficient reputation to add comment (personally, I don't think this reputation system is reasonable), and I felt that I should share this to someone who is facing the same issue, or for someone who has experience on how to fix the issue.

share|improve this answer

The "~/.bash_profile" for fish is in ~/.config/fish/ (if it doesn't exist create it). To have it run on login put this in the file:

if status --is-login
 bind \e\[1\;5C forward-word
 bind \e\[1\;5D backward-word
share|improve this answer

I fixed it on my end. This goes in the config:

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

"source" it by executing:

. .config/fish/

("." is source in fish)

Hope that helps you!

share|improve this answer
Great! But I'm having a problem getting this to run automatically every time I open a terminal. I don't want to source it manually every time. Is there a way to do it automatically? – Seb Sep 6 '12 at 15:24
@Seb Same here. I don't use fish frequently enough (due to these kinds of issues) for this to have been an issue, so I am still sourcing manually. I would very much like to know, though. You could open a question I guess? – eggonlegs Sep 9 '12 at 18:57
the "~/.bash_profile" for fish is in ~/.config/fish/ (if it doesn't exist create it). To have it run on login do this: if status --is-login bind \e[1\;5C forward-word bind \e[1\;5D backward-word end – Steve Ross Apr 23 '13 at 20:57
Hi, @eggonlegs , is the escape sequence you typed stand for escape + [ + 1 + ; 5 C", this is quite a long sequence. Why use such a long key sequence, isn't it hard to press them all? – richard.g Aug 22 '15 at 1:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.