Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

191–200 of 406 posts

Re: Quick tip for developers who use OS X

#191

Earlier quoted context omitted.

Just wanted to note: C-u kills from cursor to start of line. C-w kills from cursor to start of previous word. M-d is its friendly forward sibling.

Thanks! fixed. I never noticed C-u was from cursor. I tend to use it mostly from the end of the line.

And that's why C-e C-u is burned into my hands :^)

Re: Quick tip for developers who use OS X

#192

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 formatting" shouldn't be necessary for most programs, and isn't a platform standard. Paste is command-V. A sensible application should do the most likely thing the user wants with paste and overload the shortcut for weird stuff. The fact that Microsoft consistently does the weird thing by default isn't a platform problem with the Mac, just with Word.

Now you could point out Pages has the same shortcut and same stupid behavior. I agree, but that's what happens when there's a clear market leader.

(Oddly enough, I've been implementing a web-based word processor, and we make paste-and-match (paragraph) style while retaining (character) styles the default. You can't actually do this in Word or Pages — default or not — despite the fact it's what users want 99% of the time. So if I paste some text with an italicized passage, the font changes to match the ambient styling, but the italics remain. When we implemented it, the UX people were flabbergasted -- they assumed it must be impossible because no word-processor does it.)

Re: Quick tip for developers who use OS X

#193
oo! As long as we're sharing our favourite terminal tips, here's mine: In your .bash_profile, add this line:

alias imgsz='sips -g pixelWidth -g pixelHeight'

sips stands for "scriptable image processing system"[1], and provides terminal users with a toolset for inspecting and manipulating images. The alias above is really useful for web developers who need a quick look at how big a given image is:

    $ imgsz logo.png
    /path/to/logo.png
    pixelWidth: 500
    pixelHeight: 120
[1] https://developer.apple.com/library/mac/documentation/Darwin...

Re: Quick tip for developers who use OS X

#194
post #143
post #118

After making the switch to OS X in the last couple years after living in Linux and Windows before that, I think it's objective to say that keyboard shortcuts in OS X are much worse in both ease of use and consistency across applications.

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.

Re: Quick tip for developers who use OS X

#195

Earlier quoted context omitted.

More: - C-u to kill (cut) from current location to beginning of the line - C-k to kill (cut) from current location to end of line - C-w to kill (cut) from current location to beginning of word - C-y to paste (copied / cut) lines - C-l to clear screen (I use the shit out of this) - Ctrl + shift + '-' (holding ctrl, shift, minus at the same time), for undo. That is it. EDIT: Damn it, I didn't realize I was saying a bun…

Pressing ESC and then _ will insert the last argument of the last line. Repeat to go up in the history. If you go through the command history and press CTRL-o on a line it will be executed and the command on the commandline will be replaced by the next line in the history.

In Bash, you also can use the $_ variable which is the last argument of the previous command:

  $ stat /tmp/foobar
    File: `/tmp/foobar'
    Size: 0         	Blocks: 0          IO Block: 4096
    ...
  
  $ rm -v $_
  removed `/tmp/foobar'

Re: Quick tip for developers who use OS X

#196

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…

IntelliJ actually provides two sets of MacOS keyboard shortcuts, for some reason. The non-default (MacOS 10.5+) is generally far better.

Re: Quick tip for developers who use OS X

#198
post #185
post #136

Earlier quoted context omitted.

I you tried Evil-mode, i actually using Emacs with this, now i got the power of emacs with the efficiency of Vi in one place.

Depends on how much of Vi/Vim you use. IIRC, Evil-mode doesn't implement everything.

Pretty much 90%, but that is enough at least for me.

Re: Quick tip for developers who use OS X

#199

Earlier quoted context omitted.

> 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 formatting" shouldn't be necessary for most programs, and isn't a platform standard. Paste is command-V. A sensible application should do the most likely thing the user wants with paste and overload the shortcut for weird stuff. The fact that Microsoft consistently does the weird thing by default isn't a platform problem with the Mac, just with Word. Now you could point out Pages has the same shortcu…

> "Paste and match formatting" shouldn't be necessary for most programs, and isn't a platform standard.

If I copy and paste from a web browser, sometimes I want the formatting and sometimes I don't. It's not an usual case. Places where I use this shortcut include Word, Evernote and Mail. It's just not a sensible key combination.

Post reply on HN