Why does fn-⇧-→ (or others) do a home/end in Terminal but a ⌘-→ works everywhere else?
So just to be clear the question is how to make Terminal take Command + ← and → for home and end?
As convenient as it would be, Terminal can't easily provide the functionality you ask for.
The reason is that programs that run inside Terminal have different rules for moving the cursor to the beginning/end of the line, for example:
Other programs may use other keys. There isn't a universal key combination for positioning the cursor at the beginning/end of the line.
Of course, Terminal could maintain a list of key combinations for a number of common programs, check what's running and send the correct keys for you, or it could provide a menu item like Move Cursor To Beginning Of Line Inside Shell ⌘← and then send CtrlA behind the scenes. But I guess Apple engineers thought that if you venture in CLI territory you know its idiosyncrasies.
(Surprinsingly, Terminal provides Option← and Option→ which behaves as you would expect, moving the cursor to the beginning of the previous/next word. That only works reliably in
You can still configure ⌘← and ⌘→ to match CtrlA and CtrlE so that it works in
You will notice that there is a short delay between the moment you press ⌘← or ⌘→ and the moment the cursor actually moves.
Bear in mind that it will only work for programs that honor CtrlA/CtrlE, so you may still want to learn the specific key combinations of each program you use in Terminal.
(Tested on OS X 10.3.3 Yosemite)
Of course its possible.
First of all, you can use the free tool "DoubleCommand" if you have a windows keyboard with HOME/END keys to make'em behave like they should (beginning /end of line).
Secondly, for terminal specifically, go to the preferences, Keyboard, edit the icon/key which looks like an arrow pointing up-left, select "send text" and type ctrl+a. Done!
Same for the end button..
If you dont have a PC keyboard, you can do the same with other key combinations.