Quick tip for developers who use OS X
Bash, running in your terminal, understands both the Emacs and the Vi commands.  By default is Emacs, so you can C-a (control-a) for beginning of line, C-p to go back in command line history, or C-r to search it.I prefer the Vi mode, though.  Add to your .bashrcset -o viThen you can press escape to go from input mode to normal mode; there k will take you to the previous line in command line history, j to the next line, ^ and $ to the beginning and end of the line, /something will search something back.Editing is really fast; move by words with w (forward) and b (backward), do cw to replace a word, r to replace a letter, i to go back to input.  It will remember the last editing command, just as Vi, and repeat it when you press . in normal mode.