Word jumping in iTerm2 or Terminal in OSX Lion

Viewed 30323

I recently upgraded from Snow Leopard to Lion and Xcode 4.1, and word jumping stopped working in both Terminal and iTerm2. Did the mappings change?

This is with and without a homebrew installation of readline.

My .inputrc looks like this:

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

Thanks!

6 Answers

Killing a fly with a cannon:

  • Go to Preferences... > Profiles > Keys
  • Press Load Preset...
  • Select Natural Text Editing

Then, you can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →, move to the start of the line using fn + ← and to the end of the line with fn + →. Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫.

If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew+Cask:

brew cask reinstall iterm2

source and credits https://apple.stackexchange.com/a/293988/330806

Related