Don't forget that just about everything in OSX and Linux supports readline navigation:<p><pre><code> C-n - next line
C-p - previous line
C-f - next char
C-b - previous char
C-a - beginning of line
C-e - end of line
</code></pre>
I assume there are others as well, but that's pretty much what I use.