Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In a GNOME terminal, the standard ways of moving forward or backward by one word do not work.

In spite of what the documentation says:

alt+b : Goes back one word at a time.

alt+f : Moves forward one word at a time.

If I do the above, I just open the drop-down menu for Tabs and Edit. How can I fix this?

share|improve this question
add comment

3 Answers 3

up vote 14 down vote accepted

In the Terminal, go to EditKeyboard Shortcuts... and untick the Enable menu access keys box.

share|improve this answer
add comment

just press ctrl- and ctrl-

share|improve this answer
    
Uh! I totally prefer this! –  Ricky Robinson Mar 11 at 10:59
3  
And I'm so psyched that this command seems to work everywhere: on a terminal, on gedit, on this very text box too!! :-o –  Ricky Robinson Mar 11 at 12:58
1  
@RickyRobinson: This little feature is one of the top 5 reasons I prefer Linux over every other OS :) –  Reeno Mar 11 at 13:11
    
Doesn't it work on a mac? –  Ricky Robinson Mar 11 at 13:35
2  
It's even available on Windows –  Kroltan Mar 12 at 2:21
show 1 more comment

From the readline manpage (readline is the library that implements these commands):

An emacs-style notation is used to denote keystrokes. Control keys denoted by C-key, e.g., C-n means Control-N. Similarly, meta keys are denoted by M-key, so M-x means Meta-X. (On keyboards without a meta key, M-x means ESC x, i.e., press the Escape key then the x key. This makes ESC the meta prefix. The combination M-C-x means ESC-Control-x, or press the Escape key then hold the Control key while pressing the x key.)

@Galgalesh is correct that you use the Ctrl+arrow keys to jump words in Ubuntu. In many (most?) other distributions the key combo is Alt+arrows.

In order to use Alt+f/Alt+b without interfering with the menus, use Esc, f (press Esc, THEN press f, not both at the same time).

The reason I mention this is that you can use the Esc then (key) trick for other commands, too. E.g., if you've started editing a previous command and decide you want to revert it, use Esc, r.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.