Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On a brand new MacBook Pro, the keyboard doesn't seem to act as expected for Terminal.app. I'm expecting Ctrl-a and Ctrl-e to be home and end functions, but I just get "^A" and "^E" echoed to the terminal. How can I get these working on the MacBook Pro?

Terminal 2.1.1 ; Snow Leopard ; MacBookPro6,2

share|improve this question
1  
What application are you running inside the terminal? –  Gilles Nov 30 '10 at 0:33

1 Answer 1

Try manually setting your editing mode to emacs with the following line:

set -o emacs

You can also try this one (and save to ~/input.rc to make it persistent):

set editing-mode emacs

You can also set additional key bindings in .inputrc that may not be working by default:

# Delete key
"\e[3~": delete-char

# Home and end
"\e[1~": beginning-of-line
"\e[4~": end-of-line   # fixed syntax error in this line

# Ctrl+arrow cursor movement
"\e[5C": forward-word
"\e[5D": backward-word

# History completion
"\e[B": history-search-forward
"\e[A": history-search-backward

Some other useful settings to include in this file:

# Case-insensitive completion
set completion-ignore-case on

# Bell style
set bell-style none

# Show ambiguous completions with one tab
set show-all-if-ambiguous on
share|improve this answer

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.