Place the Cursor at the Mouse Position in Terminal with an Option+Click
Most command line users rely heavily on Terminal keyboard navigation to move about within text files and get around within the Terminal, but Mac OS X has a super simple trick up its sleeve that lets you instantly position the mouse cursor anywhere in the Terminal.
This means no more tabbing around or repeatedly tapping on the arrow keys, you can just point and click to focus the cursor in the Terminal, just like it was the GUI, and it works the same whether the cursor destination is at the beginning/end of a line or smack dab in the center of a text block.
You’ll really want to try this out yourself to get the hang of it, so open any notably sized text document into the command line with your favorite text editor.
Move the cursor anywhere by holding down the Option key and clicking to a position in Terminal
The cursors position in the Terminal window will immediately jump to that position. Keep Option+Clicking around to see how it works, if you click an exact location the cursor goes there, if you aim away from a specific character it will go the line instead.
This may seem like a huge “duh” for most Mac users who stay within the GUI, or anyone who is accustomed to making mouse-based adjustments and edits within the graphical interface of any other app. But because the command line is keyboard centric, there is reasonably limited mouse support, which makes this using the mouse for precision pointing and cursor placement like this pretty awesome. Or maybe us nerds are just easily impressed.
Be sure you’re tracking the cursor properly when doing this, you’ll find the familiar mouse pointer turns into a set crosshair once you’re hovering in the command line, which is pretty easy to lose track of. If you’re having trouble seeing it, consider making the cursor larger for great visibility in general.
Thanks to Peter for sending along this handy tip found on MacWorld.