Search code examples
key-bindingsfishiterm2

Fish shell ESC/META keybinding with iterm2 on os x yosemite


How can I use emacs style forward/back word jumping in fish using ESC/META? In the fish shell, I tried the following w/ no effect.

bind \eb prevd-or-backward-word

Solution

  • That's the correct key binding, and you'll see it work if you press escape and b fast enough together.

    You probably want to use your option key as Escape. To make that work, set Option key to "+Esc" in the Keys tab of your iTerm2 profile. See the "How do I make the option/alt key act like Meta or send escape codes?" question of the iTerm2 FAQ for more detailed instructions.