Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

311–320 of 406 posts

Re: Quick tip for developers who use OS X

#311

OSX also features a lot of neat trackpad multitouch commands that some might not be aware of (my Windows trackpad doesn't understand multitouch.) Two fingers: up/down: scroll up/down, left/right: forward/back in some browsers (such as Chrome) Three fingers: up/down: show/hide a list of applications/desktops; left/right: switch desktops one at a time. Five fingers together/apart: show/hide desktop Before I discovered…

http://www.boastr.net/

you can add tons of additional trackpad shortcuts too, as well as keyboard shortcuts.

Re: Quick tip for developers who use OS X

#312

Earlier quoted context omitted.

Not just keyboard shortcuts, but straight out keys (e.g. Page up / Page down)

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 ?

Re: Quick tip for developers who use OS X

#313

A new one for me I accidentally found the other day.. If you use Spotlight to find something and then want to see the file in Finder, Cmd+click the item in the Spotlight dropdown. Edited from Cmd+shift+click due to note in child comment :-)

Cmd + R is universally "Reveal in Finder".

[deleted]

Re: Quick tip for developers who use OS X

#314
post #296
post #244

Earlier quoted context omitted.

I use these settings in my .inputrc. The get me a few more commands and even the ability to escape using jj. set completion-ignore-case On set bell-style none set editing-mode vi $if mode=vi set keymap vi-command "gg": beginning-of-history "G": end-of-history set keymap vi-insert "jj": vi-movement-mode "\C-p": history-search-backward

Is there a functional difference between putting... set editing-mode vi ... in one's inputrc and... set -o vi ... in one's .bashrc? I realize that .inputrc is the config file for Readline, and .bashrc is essentially a start-up file for Bash. But is it ever necessary to use both snippets?

I would imagine that .inputrc would serve as a superset in that all programs (for instance gdb) whiich use readline would now default to vi mode.

Re: Quick tip for developers who use OS X

#315
post #269

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 than Windows and much worse than Linux in both ease of use and consistency across applications.

Saurik makes most of the points that I would have if I had expounded on my comment here: https://news.ycombinator.com/item?id=7051899 If naught else, I will say that: - The use of Cmd so widely and consistently makes it easy to bind one's own shortcuts to Ctrl/Shift/Alt/... (every menu in almost every application I use contains only Cmd shortcuts). - The ability to remap shortcuts to anything in a menu being built in…

> The ability to remap shortcuts to anything in a menu being built into the system for all apps systemwide (System Preferences -> Keyboard)

Well, I didn't know this was possible... and I have used Macs for a few years!

Re: Quick tip for developers who use OS X

#316

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 Solari…

I added mouse support to Terminal via MouseTerm: https://bitheap.org/mouseterm/. Works like a charm with Vim.

Re: Quick tip for developers who use OS X

#317

Sucks that it doesn't work in iTerm2.

For some reason when I try this in iTerm2, it jumps to a different command in my history. No idea what's going on there...

Terminal does the same (for me). It's because opt-clicking above the line sends some up arrow keystrokes, which the shell interprets as moving back in history. In iTerm2 nightly builds (which are less stable than the betas) you can disable opt-click to move the cursor in prefs>profiles>pointer.

What's more interesting is the possibility of using the new shell integration features (https://code.google.com/p/iterm2/wiki/ShellIntegration) to turn off this feature just at the shell prompt. I'll open a feature request for that :)

Re: Quick tip for developers who use OS X

#318
post #244
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 use these settings in my .inputrc. The get me a few more commands and even the ability to escape using jj. set completion-ignore-case On set bell-style none set editing-mode vi $if mode=vi set keymap vi-command "gg": beginning-of-history "G": end-of-history set keymap vi-insert "jj": vi-movement-mode "\C-p": history-search-backward

> set completion-ignore-case

works well with "\t": menu-complete

But I had to delete this entry. I need the case to differentiate between which path I really wanted :(

Re: Quick tip for developers who use OS X

#319
post #234

Earlier quoted context omitted.

Did you try Powershell?

I've tried powershell, but it still seems to launch in that same ancient command window they've used for years with the exceptionally strange copy & paste characteristics (seriously, why can't it copy wrapped multi-line wrapped commands without inserting newlines when I paste?). Also why does it want to scroll past the end of the buffer? Ugh. Plus why are all the built-in commands like 20 characters long and camel ca…

You need ConEmu.
Post reply on HN