Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

111–120 of 406 posts

Re: Quick tip for developers who use OS X

#112
post #95

Earlier quoted context omitted.

Am I wrong to have long dismissed this as little more than an easter egg, or, at best, a toy server to test basic webpage functionality?

Yes. It's like a ghetto SCP for giving files to people on windows who don't have SCP. You can use it for basic web functionality, you can use it (carefully) as a mechanism for testing or serving test results. I wouldn't keep it running for days, but it's an amazingly useful tool.

Whoa, never thought of it that way. The makeshift SCP is really a good idea!

Re: Quick tip for developers who use OS X

#113
post #106
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…

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.

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 bunch of the same things as you did.

EDIT2 Thanks oinksoft for clearing up C-u and C-w.

Re: Quick tip for developers who use OS X

#114

Earlier quoted context omitted.

A lot of the Emacs shortcuts work in OS X (most of the system) as well as on Linux (bash and other users of readline).

I use Vim and was unaware that this shortcut existed. Are there any other Emacs shortcuts which are useful in OSX?

[deleted]

Re: Quick tip for developers who use OS X

#116
post #26

Earlier quoted context omitted.

A lot of the Emacs shortcuts work in OS X (most of the system) as well as on Linux (bash and other users of readline).

The basic Emacs key-bindings should work in all Cocoa apps. For instance, the URL bar of your web browser, while text editing in just about any editor (maybe even in Office, but I have not tired in a while), etc. Basically, anywhere you have a cursor, the basic line-editing key bindings should work. So, in practical terms, this means you have 1 + n clipboards[1]. The main global GUI clipboard (using the command key),…

defaults write -g NSTextKillRingSize -string 4

Re: Quick tip for developers who use OS X

#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.
Post reply on HN