Lurker News
OSX Terminal: hold option and click a position in the current line to move your cursor to that position. #yearslost

Comments (395) 107 threads

Earlier comments
caiob1 reply#
The problem here is the "click" part of it.
blktiger#
Every once in a while it's much faster to just reach for the mouse than to use keyboard shortcuts.
yogsototh2 replies#
OK, so for vim users with zsh:

bindkey -v
Now be happy, hit and, use ^ and $ but also f t and also ,;.
You can copy/paste with dd, Y, etc...

slunk1 reply#
Fyi, bash also has vi-mode (set -o vi).
pyre#
bash uses GNU readline, while ZSH has it's own readline. IIRC the Emacs-/Vi-modes in bash are support from readline. (this is also why you configure some of these things via .inputrc for Bash rather than .bashrc).
coliveira1 reply#
set -o vi does the trick for vim. Most vi commands work, but when you type v this will open vi to edit your command line, in case you feel any command is missing.
GrinningFool1 reply#
I've b een using vi-mode in the shell for a while,but haven't been able to get the v behavior you described. Did you have to do anything to make that behave?
coliveira#
I haven't done anything, my version works under Mac OS X.
IgorPartola2 replies#
Doesn't work on iTerm2, which y'all should be using anyways. Besides being infinitely more configurable, and getting tabs right, it's also much faster when you are printing a bunch of text. No idea why OS X Terminal is so slow when it comes to this, but it's actually painful to `cat` a file of more than a thousand lines.
ebzlo1 reply#
I don't cat files too often in my workflow so I guess I don't have that pain point, but I find find iTerm2 has this minor annoying latency (kind of like typing on a wireless keyboard on low battery) that ultimately drove me away from it.
IgorPartola#
Odd. I have never experienced that problem. I don't cat files, but I list git diff output, view log files, etc. Even a large-ish git blame introduces a noticeable lag.
bhaile#
Works for me on iTerm2.
makecheck#
In MacTerm, command+option+click will move the terminal cursor in the same way by simulating keys. It also moves “up” or “down”, for applications such as text editors that understand vertical arrows. There is even a preference setting that attempts to move the cursor automatically to wherever you drag and drop text with the mouse.

(Note: I wrote MacTerm.)

Load more comments