Quick tip for developers who use OS X
111–120 of 406 posts
Re: Quick tip for developers who use OS X
#112Earlier 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.
Re: Quick tip for developers who use OS X
#113Bash, 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.
- 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
#114Re: Quick tip for developers who use OS X
#115Re: Quick tip for developers who use OS X
#116Earlier 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),…
Re: Quick tip for developers who use OS X
#117Lovely, thanks. Also, is it common knowledge that CMD+click on a URL opens that URL in your default browser? Useful for the "Running on http://127.0.0.1:5000/" messages.
Re: Quick tip for developers who use OS X
#118Re: Quick tip for developers who use OS X
#119Tip: Real hackers don't use a mouse. /s