Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

131–140 of 406 posts

Re: Quick tip for developers who use OS X

#131
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).

It does not support large files, so sometimes I have to fall back to https://npmjs.org/package/http-server (npm -g install http-server .. then just run http-server /path)

Re: Quick tip for developers who use OS X

#134

drag + drop files to terminal to get its location. I often do "cd " + dragon drop folder to get to that folder in terminal

There's a free app called Go2Shell that adds a button to finder to open the current directory in Terminal/iTerm. Also works great in conjunction with "open ."

Wow, so simple but so useful. Thanks!

Re: Quick tip for developers who use OS X

#135

I have tried to use Terminal, but I just can't. The ability to highlight and automatically have the text in clipboard is such a crucial feature in my workflow that not having it even as an option is a deal breaker. Once I started with iTerm and built a config/flow around it, I can't go back. Thanks for the tip though! I didn't realize this worked in Terminal too. I'll keep it in mind the next time I'm forced to use i…

Same here. Switched to iTerm for proper mouse support in Vim, and you need only click (no option key) to move your cursor in Vim if you have `mouse=a` in your vimrc.

I used to be a die-hard Terminal.app user but with Mavericks it felt incredibly sluggish doing everything from opening to listing files to editing things and this is another reason I moved to iTerm.

Be warned, though, that if you're using Vim with Solarized you and you're trapped in low color mode you want to be sure you're declared as a 256 color term and update your `vimrc` to remove the following for the colorscheme to work properly:

Remove:

* let g:solarized_termcolors = 256

* let g:solarized_termtrans = 1

* let g:solarized_contrast = "normal"

* let g:solarized_visibility = "normal"

Re: Quick tip for developers who use OS X

#136
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 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.

Re: Quick tip for developers who use OS X

#137

Earlier quoted context omitted.

It's not emacs, it's GNU Readline (or likely some BSD readline given apple and the GPL) http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html . The shortcuts also work in every text field in the OS.

Terminal may be using some kind of Readline, I dunno. But text objects in other OS X applications use emacs keybindings because NeXTSTEP has had them since time immemorial. Like 1990 or so. Doesn't have anything to do with GNU Readline so far as I know.

It's not Terminal that uses it; it's bash, and most shells that imitate bash.

Re: Quick tip for developers who use OS X

#138
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.

I tend to find the opposite to be true.

C-a is always "beginning of line" and Command-C is always Copy.

and never the twain shall meet.

(I've had issues in linux going from terminal to windows, in fact very recently I kept ^W'ing while in GUI mode)

Re: Quick tip for developers who use OS X

#139
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.

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

Re: Quick tip for developers who use OS X

#140
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.

I have to agree. I fought with it a while, looking for third party utilities to fill the void, but eventually I realized it was more trouble than it was worth and gave up. I guess I got used to it, because I don't even miss them any more.
Post reply on HN