Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

351–360 of 406 posts

Re: Quick tip for developers who use OS X

#351
post #143

Earlier quoted context omitted.

After switching to OS X after spending years using Windows and then Linux, I found it patently the case that the keyboard shortcuts in OS X are much better in both ease of use and consistency across applications. The use of the Command key and a bunch of standard shortcuts using it are particularly notable. #notsoobjective

After switching to OS X after spending years using Windows and then Linux, I found it patently the case that the keyboard shortcuts in OS X are much better than Windows and much worse than Linux in both ease of use and consistency across applications.

After switching to OS X after spending years using Windows and then Linux, I have forgotten the feelings about keyboard shortcuts in both ease of use and consistency across applications on Windows/Linux.

Re: Quick tip for developers who use OS X

#352
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…

Most text inputs in Mac OS support at least C-a and C-e too.

Yes, Cocoa text fields by default supports EMACS keys such as C-a, C-e

Re: Quick tip for developers who use OS X

#353

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…

If you don't like it, change it. Keyboard shortcuts can be (re)defined, on a per-app basis or universally, in the Shortcuts tab of the Keyboard preferences.

I could never remember the various screen shot shortcuts, so for me it's command-escape for the clipboard and option-escape for straight to a file.

It took me less than a minute to change Pages so command-v pastes matching style, and command-option-v pastes with the original style. Even better, Pages's menus display the new shortcuts.

The latest Pages doesn't really seem to have paragraph styles vs. character styles, so it might be more difficult to pull that off, but Automator is very clever, and AppleScript moreso, so I'm betting it's possible.

Re: Quick tip for developers who use OS X

#355
post #72

Nobody seems to have posted this yet: python -m SimpleHTTPServer I'd recommend an alias like "serve". It basically puts the current directory online (binds to 0.0.0.0:8000).

similarly, you can get a janky json pretty printer by doing: curl -s http://some/json/url | python -m json.tool

When your needs stretch beyond that, try 'jq'. http://stedolan.github.io/jq/

For pretty-printing without modification,

    cat myjson | jq '.'

Re: Quick tip for developers who use OS X

#357

Earlier quoted context omitted.

Fn+up/down and Fn+left/right are easier to use and just make much more conceptual space to me than the PgUp/PgDown/Home/End key blob.

Hrm.. I don't use OSX, in my fingers... home goes to the beginning of the line, and ctrl+home goes to the beginning of the document.. If I want to select to the begining of the document ctrl+shift+home... in OSX does that mean to select to the beginning of the document it'd be something like fn+command+shift+left ?

These are command-arrow functions. Cm-left is beginning of line, Cm-up top of document, and so on. Select to beginning of document is Shift-Cm-Up, and so on.

Re: Quick tip for developers who use OS X

#358
post #297
post #187

Earlier quoted context omitted.

On most macs, Fn + left/right arrow are home/end. Fn + up/down are pageup/pagedown.

Fn... urgh. I hate these crippled laptop keyboards (and tiny neck pain inducing laptop monitors).

Well, you don't have to follow that glossy mainstream. Just get yourself a new linux desktop with lots of RAM, couple of nice matte monitors, mouse and a good full size keyboard.

Re: Quick tip for developers who use OS X

#359
post #156
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…

you can also go into visual mode (at least in vi mode).. pressing esc then v will launch your default editor with the current command in the buffer; saving an exiting runs the command; very useful for long commands and/or iterating

bash/emacs has C-x C-e to open up the command in a editor.
Post reply on HN