Question: How do I better navigate the command line? In TextMate, I can do:

* `CMD` + `ALT` + `ARROW` to switch tabs
* `CMD` + `SHIFT` + `ARROW` to highlight lines of text
* `ALT` + `SHIFT` + `ARROW` to highlight words
* `ALT` + `ARROW` to jump words, etc.

How do I do this kind of stuff in the terminal?

Answer: 
In MacOS' Terminal app, you can change your keyboard bindings; go to Terminal Preferences (shortcut `Cmd` + `,`) and navigate to the 'Keyboard' tab:

```
Key => Action
control cursor left => \033b
control cursor right => \033f

```

etc. You can do the same thing with other emacs-style bindings. As far as switching tabs, that's a System Preferences > Keyboard > Keyboard Shortcuts setting; click 'Application Shortcuts' on the left side, and then click `+` on the right to add a new shortcut. Use your desired keyboard combo and pair it with the exact menu name, which in Terminal for moving forward/backward through tabs is 'Select Next Tab' and 'Select Previous Tab' (via the Window menu in Terminal), respectively.

Does that help?
This is a pointer for anyone landing here looking for the equivalent tips for iTerm (as opposed to the default terminal).

To do the same in iTerm, go to menu "Bookmarks", "Manage Profiles", "Keyboard profiles", "Global".

Then add all of the shortcuts you see in the other answers here, but instead of sending text "\033..." when creating a mapping, you simply select the action "send character sequence" and the character for the escape sequence!.

* "\033b" becomes b
* "\033f" becomes f
* and so on.

[Escape sequence example](http://i.stack.imgur.com/woUEy.png)