end-of-line, beginning-of-line keys for Terminal.app on Macbook Pro Keyboard
On a Macbook Pro keyboard, how do you go the the end-of-line and beginning-of-line in Terminal.app?
Note that Ctrl-a and Ctrl-e on this computer with default configuration does not work. They just echo "^A" and "^E"....
Terminal 2.1.1 ; Snow Leopard ; MacBookPro6,2
12 Answers
Ctrl + a and Ctrl + e for beginning and end respectively.
Bonus: Ctrl + w deletes the previous word.
EDIT: As far as I can tell, you are using the zsh shell, which by default does not use Emacs key bindings. To get the behaviour you want, do the following during your session:
echo "bindkey -e" >> ~/.zshrc && source ~/.zshrcYou should be good to do. For more keybinding information, please check the relevant section from the Zsh manual.
8fn+← and fn+→ work for me (they represent Home and End respectively).
More convenient than ctrl+A and ctrl+E in my opinion.
1