99

Everyone at work recommended iTerm2 to me instead of the native Terminal. But iTerm2 doesn't seem to allow me to use bash shortcuts like Alt+B and Alt+F to jump back/forward between tokens, or Alt+D to delete a word.

I can't imagine this isn't available. Can anyone help me out?

rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
rewolf
  • 5,561
  • 4
  • 40
  • 51

1 Answers1

161

The Option key (the Mac name for the Alt key) by default has other uses. Press Command+O to open the list of profiles, select Default (I assume that is the profile you are using), and click "Edit Profiles...". In the resulting window, click on the "Keys" tab, and select "+Esc" for one or both option keys. This should cause iTerm to treat the Option key the way you are accustomed.

Alternatively, you can simply use the Escape key instead.

enter image description here

rofrol
  • 14,438
  • 7
  • 79
  • 77
chepner
  • 497,756
  • 71
  • 530
  • 681
  • 9
    Thanks this was the config I was looking for. I keep forgetting it's call "Option" as mine says "alt" above it, so I didn't even consider that setting when I skimmed offer the dialogs. I don't want to use Esc, as I'm switching between my mac and a linux box all the time which Esc doesn't work with. Thanks a lot. NOTE to reader. select "Esc+" not "Meta" for the "option" key override. – rewolf Sep 20 '13 at 21:34
  • 8
    Be sure to navigate to "Preferences -> Profiles -> Default -> Keys" instead of "Preferences -> Keys". – Damien Sep 16 '15 at 05:17
  • Command O does not open profiles for me. Where do I find this on the latest mac? – Caleb Stanford Jun 21 '19 at 15:02
  • Also using esc-F doesn't work with multiple presses (you have to release and re-press esc each time, which is a bit annoying) – Caleb Stanford Jun 21 '19 at 15:02
  • 1
    Ah I found it -- Terminal > Preferences. (I thought this was a system wide thing so I was looking in system preferences.) I'm glad the remapping is only local to Terminal. See the comments [here](https://stackoverflow.com/a/81309/2038713) – Caleb Stanford Jun 21 '19 at 15:09