Switch to iTerm2. It's free and much nicer than plain old terminal. Also it has a lot more options for customization, like keyboard shortcuts.
Also I love that you can use
cmd and 1-9 to switch between tabs. Try it and you will never go back to regular terminal :)
How to set up custom keyboard preferences in iterm2
- Install iTerm2
- Launch and then go to preference pane.
- Choose the keyboard profiles tab
- You will either need to copy the profile to something new and then delete the arrow key shortcuts such as
^ right / left arrow or if you don't care about a backup just delete them from the default profile.
- Next make sure your modified profile is selected (starred)
- Now choose the keyboard tab (very top row)
- Click on the plus button to add a new keyboard shortcut
- In the first box type
CMD + left arrow
- In the second box choose "send escape code"
- In the third box type the letter B
- Repeat with desired key combinations.
escape + B moves one word to the left,
escape + fmoves one word to the right.
- you may also wish to set up cmd+d to delete the word in front of the cursor with
escape + d
I often hit the wrong button (cmd / control / alt) with an arrow key and so i have my arrow key combinations with those buttons all set to jump forward and back words, but please do what fits you best.