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
scelerat4 replies#
The first thing I do when setting up a new Mac is make the Caps Lock key into another Control key.

System Preferences > Keyboard > Modifier Keys
Saves lots of awkward pinky-bending.

oneeyedpigeon#
Just the fact that you can disable Caps Lock is a sanity-saver: thank you!
lunixbochs#
I go one step further and bind it to Hyper (ctrl+alt+cmd), and use hyper for tiling window management, like "snap window top left of screen grid", etc.

https://github.com/lunixbochs/reslate

deadfall#
I did this on my Mac a few years back and do it on Windows machine at work. I also use Hotkeys to swap alt and ctl to match my Mac.
72deluxe2 replies#
Is it me or do Mac Caps Lock keys require you to hold them down for close to a second for them to activate? There appears to be some kind of hardware timer in them to work...?

I noticed this coming from Windows and Linux on other keyboards where tapping Caps Lock works but on Mac OSX with an Apple keyboard or on a Macbook you have to make a real deliberate effort to keep the key down longer than a nanosecond for it to register.
Is it just me who has noticed this?

chewxy#
I noticed this on the lock screen. Often you'd have to tap multiple times on caps lock before it even turns on. I assume it's to prevent accidental caps locking, but it can be rather irritating
dbtc#
It's not just you. I think it is to prevent accidentally toggling it when going for tab.
purephase3 replies#
I have tried to use Terminal, but I just can't. The ability to highlight and automatically have the text in clipboard is such a crucial feature in my workflow that not having it even as an option is a deal breaker.

Once I started with iTerm and built a config/flow around it, I can't go back.
Thanks for the tip though! I didn't realize this worked in Terminal too. I'll keep it in mind the next time I'm forced to use it.

drpre#
Command-shift-v pastes the current selection into Terminal (and anywhere else in OSX).
actionscripted1 reply#
Same here. Switched to iTerm for proper mouse support in Vim, and you need only click (no option key) to move your cursor in Vim if you have `mouse=a` in your vimrc.

I used to be a die-hard Terminal.app user but with Mavericks it felt incredibly sluggish doing everything from opening to listing files to editing things and this is another reason I moved to iTerm.
Be warned, though, that if you're using Vim with Solarized you and you're trapped in low color mode you want to be sure you're declared as a 256 color term and update your `vimrc` to remove the following for the colorscheme to work properly:
Remove:
* let g:solarized_termcolors = 256
* let g:solarized_termtrans = 1
* let g:solarized_contrast = "normal"
* let g:solarized_visibility = "normal"

pilif1 reply#
This works if whatever is currently running in your terminal has support for the XTerm mouse escape sequences.

Option-click is the shortcut to tell the terminal to forward the click to the application running in the terminal. That's usually your shell or some editor.
I seem to faintly remember that at some point this was actually configurable and you could configure the terminal to forward non-option-clicks and only enable selection mode on option clicks. I didn't find this option in current iTerm or Terminal.app versions though - I might just be imagining this.

tanvach#
I can confirm that this works with VIM and nano
rynop#
Nother related tip: command + click on a file in iTerm opens it up. Test it out by doing ls -al then cmd+click on file name.

Load more comments