Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Word jumping in iTerm2 or Terminal in OSX Lion

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!

like image 210
Carson Avatar asked Jul 23 '11 16:07

Carson


People also ask

How do you jump a word in Mac terminal?

ALT + F to jump Forward by a word. ALT + B to jump Backward by a word.

What is the difference between iTerm and terminal in Mac?

Terminal's split panes give you two views of the same window, while iTerm2's give you unlimited independent terminals in one tab. As always, if something is important to you, please file a detailed enhancement request or bug report at bugreport.apple.com . That's the best way to ensure that your voice is heard.

How do I change my default terminal to iTerm Mac?

Find the file in your finder, right click on it, choose get info, then expand the Open With tab. There you should find a dropdown menu on what to open those kind of files with. The default is terminal, but choose iTerm2 and click on change all.


2 Answers

Just add the escape sequences in iTerm settings as global shortcut keys.

Word backward (option-arrowleft):

a iTerm settings

Same with word forward, just use F.

like image 174
Nik Avatar answered Oct 10 '22 15:10

Nik


The easiest/quickest way I have found is under Profiles > Keys > 'Load Preset...' > 'Natural Text Editing'.

Then use the option key rather than the control key.

(iterm2 version 3)

like image 21
typingduck Avatar answered Oct 10 '22 16:10

typingduck