Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Mac OS X Terminal.app. But the answer to this would probably apply to any typical UNIX-ish terminal emulator in a graphical environment.

Question -- what do I do to: Use my mouse cursor to click on a character-position in the current line of the terminal, and have the terminal's cursor jump to that spot?

Typically, you have to hold down an arrow key to move to the correct cursor position. If you're pasting in a long string of text at the shell prompt, or working in an editor like VI, this can take a long time. I know editors have other navigation keys like jump-words, but I like my mouse cursor.

share|improve this question
up vote 13 down vote accepted

vim:

 :set mouse=a
share|improve this answer
    
At the time this answer was given, Terminal did not support Mouse Reporting, so this answer was invalid—which makes me wonder how it could be the accepted answer. However, as of OS X 10.11 El Capitan, Terminal now supports Mouse Reporting and this will work in Vim. – Chris Page Oct 13 '15 at 2:12
    
It would improve this answer to add an explanation of how to use ~/.vimrc to enable Mouse Reporting automatically. – Chris Page Oct 13 '15 at 2:13
2  
@ChrisPage: if you want to improve this answer: click the edit link. regarding the "at the time the answer was given the answer was invalid": i would not have given the answer if it would not have worked on my machine at that time. and it worked for OP at that time as well. – akira Oct 15 '15 at 9:03
    
You must have had the MouseTerm SIMBL plugin installed. bitheap.org/mouseterm – Chris Page Jan 15 at 3:00

In Mac OS X Terminal, you can hold down Option (or Alt) and click, and the typing cursor will move to the mouse cursor.

share|improve this answer

Nano can do this with the '-m' argument.

share|improve this answer
    
At the time this answer was given, Terminal did not support Mouse Reporting, so this answer was invalid. However, as of OS X 10.11 El Capitan, Terminal now supports Mouse Reporting and this will work in Vim. – Chris Page Oct 13 '15 at 2:12
    
It would improve this answer to add an explanation of how to use ~/.nanorc to enable Mouse Reporting automatically. – Chris Page Oct 13 '15 at 2:14
    
You probably had the MouseTerm SIMBL plugin installed: bitheap.org/mouseterm – Chris Page Jan 15 at 3:01

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.