Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

271–280 of 406 posts

Re: Quick tip for developers who use OS X

#272

Earlier quoted context omitted.

If you want to change command key-centric menu shortcuts for a program, you can do that in the keyboard pane of system prefs.

No. In Linux I have global keyboard shortcuts to launch specific applications and do some other stuff. I hit a key combo and a new terminal pops up, or a new tab pops up in my browser, or a new email, or the Python shell, or whatever else I want. It launches regardless of what other application I'm currently using. In OSX, last time I looked (maybe a version or two ago), there was really no builtin way to achieve the…

It won't reduce keystrokes, but if you're looking for something more powerful try Launchbar. Alternatively, Quicksilver's free, but I haven't used it in a couple years and management changed hands; so I'm not sure how good it is now.

Re: Quick tip for developers who use OS X

#273

Earlier quoted context omitted.

OK here's one. I press command-option esc to Force Quit an app. But how do I then close the Force Quit window (which stays on top of all other windows) without the mouse? Thanks to anyone who's figured this out.

Command-W

Which is the same way you close any other document...

Re: Quick tip for developers who use OS X

#274
post #144

Earlier quoted context omitted.

Not sure if I'm falling for sarcasm, or just an outlier for feeling the exact opposite...

Same (and to be clear, this is from someone who only "switched" to OS X a few years ago because of the demands of my user community: and for the first year I hated it, as I liked neither the hardware nor OS X 10.5). So, to add some concrete-ness: what fundamentally makes OS X better at this is the way the command key is used; almost everything that has to do with the UI or the system is bound to the command key, whic…

Everyone hates on Terminal, but I've made the changes you mentioned and I tend to prefer it to iTerm. I can't really quantify it. I definitely think TotalTerminal is superior to the equivalent feature in iTerm, and due to the nature of my work I tend to pop in and out of the visor frequently.

Re: Quick tip for developers who use OS X

#275
post #244
post #52

Bash, running in your terminal, understands both the Emacs and the Vi commands. By default is Emacs, so you can C-a (control-a) for beginning of line, C-p to go back in command line history, or C-r to search it. I prefer the Vi mode, though. Add to your .bashrc set -o vi Then you can press escape to go from input mode to normal mode; there k will take you to the previous line in command line history, j to the next li…

I use these settings in my .inputrc. The get me a few more commands and even the ability to escape using jj. set completion-ignore-case On set bell-style none set editing-mode vi $if mode=vi set keymap vi-command "gg": beginning-of-history "G": end-of-history set keymap vi-insert "jj": vi-movement-mode "\C-p": history-search-backward

>set completion-ignore-case On

Thanks. Keeping track of whether certain directories were capitalized or not has been unnecessarily occupying my mental bandwidth for years.

Re: Quick tip for developers who use OS X

#277
post #147
post #106

Earlier quoted context omitted.

C-a : beginning line, C-e end line, alt+f forward word (unless system shortcut for file menu), alt+b back word, C-k kill line, C-b back char, C-f forward char. At least in my current setup, C-w yank and C-y paste works as well. Immensely helpful. Sometimes at+left/right does forward/ back word depending on the terminal emu. Note most of these keystrokes are valid in nano as well.

http://tiswww.case.edu/php/chet/readline/readline.html These work in most GUI inputs as well.

Mac OS X uses libedit (http://thrysoee.dk/editline/, http://www.opensource.apple.com/source/libedit/libedit-39/), not GNU readline.

But yes, the keybindings work in Cocoa text controls, too, for example in TextEdit, in the Safari URL/search control, etc.

Re: Quick tip for developers who use OS X

#278

Earlier quoted context omitted.

Sorry, but this is laughable. Keyboard shortcuts are far more useful and consistent across applications in OS X. I'm failing to understand how you could form this opinion...which shortcuts / programs don't meet your expectations? I guess I can sum this up by saying OS X has an additional modifier key than Windows, so you basically have 33% more power right out of the gate. The "Windows Key" is nearly useless.

> Sorry, but this is laughable. Keyboard shortcuts are far more useful and consistent across applications in OS X. I don't agree with this at all. I find it baffling that a company of great designers made such bad decisions about keyboard shortcuts. Perhaps they are consistent, but they are consistently bad. Paste and match style (incredibly useful) is "alt-shift-command-v" i.e. four keys. There are plenty of other s…

    > Paste and match style (incredibly useful) is "alt-shift-
    > command-v" i.e. four keys . . . Four is too many. Three 
    > is too many for such an important function.
I've literally never heard of this functionality before, in any application, on any platform.

Re: Quick tip for developers who use OS X

#279
post #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

For the lazy:

  $ echo "alias o='xdg-open'" >> ~/.bashrc
Post reply on HN