Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

61–70 of 406 posts

Re: Quick tip for developers who use OS X

#63
post #38

A new one for me I accidentally found the other day.. If you use Spotlight to find something and then want to see the file in Finder, Cmd+click the item in the Spotlight dropdown. Edited from Cmd+shift+click due to note in child comment :-)

isn't it just Cmd+click ?

Oh hey, so it is, even better! :)

Re: Quick tip for developers who use OS X

#64
Another really useful command is the open

    $ open filename.png
    $ open .
    $ open -e filename.txt
    $ open -a Pixen filename.png
The first command will open the file with the default application.

Open . will open the current directory in finder, which I find very helpful.

The -e flag will open the file in textedit.

The -a will open the file in the given application name.

Re: Quick tip for developers who use OS X

#65
post #46

Tip: Real hackers don't use a mouse. /s

... so do they prefer a track ball or TrackPoint (or some sort of Minority Report gestures-based system)? /s

No, they just use the keyboard. And use a mouse emulator (move pointer with the keyboard) on those instances where there's no kb shortcuts.

Re: Quick tip for developers who use OS X

#66
post #23

Osx terminal uses almost all of the emacs movement keys by default. Ctrl-a and ctrl-e are useful but I find the meta movement keys to be the most helpful. (usually alt or ESC) Meta-f jump forward a word Meta-b jump backwards a word

It's not emacs, it's GNU Readline (or likely some BSD readline given apple and the GPL) http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html . The shortcuts also work in every text field in the OS.

Terminal may be using some kind of Readline, I dunno. But text objects in other OS X applications use emacs keybindings because NeXTSTEP has had them since time immemorial. Like 1990 or so. Doesn't have anything to do with GNU Readline so far as I know.

Re: Quick tip for developers who use OS X

#67
post #23

Osx terminal uses almost all of the emacs movement keys by default. Ctrl-a and ctrl-e are useful but I find the meta movement keys to be the most helpful. (usually alt or ESC) Meta-f jump forward a word Meta-b jump backwards a word

It's not emacs, it's GNU Readline (or likely some BSD readline given apple and the GPL) http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html . The shortcuts also work in every text field in the OS.

It at least used to be the case that GNU Readline was GPL-licensed, instead of LGPL, as to make readline a "carrot" to encourage GPL adoption. That shouldn't be an issue for bash, which is also GPL licensed.

Re: Quick tip for developers who use OS X

#70

Another really useful command is the open $ open filename.png $ open . $ open -e filename.txt $ open -a Pixen filename.png The first command will open the file with the default application. Open . will open the current directory in finder, which I find very helpful. The -e flag will open the file in textedit. The -a will open the file in the given application name.

Under Linux there is a similar command: xdg-open
Post reply on HN