Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there any way at all to use the mouse cursor to move the cursor in terminal, like click where you want it and press a key to move it there?

This is one of the most annoying things I've ever found using the terminal

I know Ctrl+A will move to the beginning of the line but sometimes these commands are so long

share|improve this question
add comment

1 Answer

up vote 16 down vote accepted

Try option-click, that is, click with option pressed.

This works on the command line and also in screen editors, such as vi and nano.

option-click just sends the appropriate escape sequences to move the cursor to anywhere in the terminal screen. (To see this working, try it with cat.)

share|improve this answer
    
Didn't know that, wonder if there is a way to make this work in iTerm. –  Gerry May 30 '12 at 10:42
2  
@Gerry, ah, finally a feature that Terminal has that iTerm hasn't! –  lhf May 30 '12 at 10:58
    
@Gerry, see Option + click in iTerm. –  lhf May 30 '12 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.