1

When I open a terminal in iTerm2, I can use the command key to make it work like Meta, so that I can for example move between words (e.g. with -f and -v.

However, as soon as I start a tmux session within the terminal (e.g. by typing tmux new, for some reason these bindings don't work anymore, why? and how can I fix it?

Update

Below is a picture of my iTerm2 preferences:

enter image description here

  • Have you enabled the xterm-keys window option? Without it tmux will recognize ^[[1;5D as M-Left, but if xterm-keys is off it will transmit it as plain Left (i.e. ^[[D or ^[OD). – Chris Johnsen Sep 30 '13 at 2:38
1

Do you have the command keys mapped to option in the Keys tab and the option keys set to act as meta in the Profiles tab? If you do, set the option keys to act as "+Esc" in the preferences:

When the option keys are set to act as meta, they are not recognized in tmux.

Edit: \e[1;5D and \e[1;5C are not recognized by tmux either. You could just map ⌘B to \eb and ⌘F to \ef:

  • Thanks I have that activated already, but I am actually using Command-f and Command-b to move between words (see my updated edits), so that should not be related. – Amelio Vazquez-Reina Sep 28 '13 at 19:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .