Hacker News new | ask | show | jobs
by gradstudent 3186 days ago
I remember the first time I saw Spotlight. It was magic. Then came Expose. Wireless that worked. Sleep that worked. Trivial configuration of things like sshd, apache and samba.

Amazing days.

Lately I only upgrade when forced. I ran 10.8 until earlier this year when I finally upgraded my machine. Then I spent a week trying to figure out how the hell to get gdb working again because binaries now require code signing and there's this horrible new thing called System Integrity Protection that tries to protect me from myself. They also took away my Escape key and replaced it with this TouchBar nonsens just because I wanted an i7 CPU. To put this into perspective: I practically live inside vim.

3 comments

Remap single tap CAPS to ESC and when used in combination with another key or long-pressed - CTRL. This has changed the way I use my keyboard in vim and tmux.

I'm doing this on Ubuntu, but there are ways to get it done on OSX too.

I have `jk` mapped to ESC in spacemacs, zsh and anything else I can set up to use vi keybindings. `jk` is essentially a no-op in vi, so rebinding it doesn't cause any issues while carrying the advantage that my fingers never have to leave the home row.
Out of curiosity, how do you type "Dijkstra" in that case?
I've never typed Dijkstra in Vim, but if I had to, there are two reasonable options:

1. Wait a half-second after typing the "j". That causes the mapping to time out and you can type the "k" without a problem.

2. Type something like Dijj<del>kstra.

Copy and paste from another window? If your use of the word "Dijkstra" is frequent enough for this method to bother you, there must be other mappings that would work.
I have a similar key binding set up. One option is to press a key that doesn't do anything in between.
I loved his solution until this. This is a deal breaker. Time to go back to the abbacus. ;)
It’s even easier now; the keyboard prefs in settings allows caps to esc reassignment through the UI.
Do you have any hints on how one might implement this on mac OS? I'd love to have my keyboard configured like this...
you can do it with the app karabiner elements.

once installed, open the app, and go to the "complex modifications" tab. then click "add rule". then click "import more rules from the internet". on the web site that opens, expand "Modifier Keys". import "Change caps_lock key".

that'll give you a rule to do what you want in karabiner. (the rule is "Change caps_lock to control if pressed with other keys, to escape if pressed alone".)

It’s in keyboard modifier keys.
that'll get you caps-as-control, but not caps-as-control-AND-escape (unless they've added that in high sierra, but I don't think so).
Ctrl-c can be used as esc in vim
SIP is protecting you from rootkits. And it’s pretty trivial to turn off if you want to do that.
And from being productive!
Details? Unless you’re developing malware or low-level system extensions SIP should have no impact on day to day work.
It breaks all sorts of things, even the version of py2app that Apple themselves ship - but are too lazy to test or read bug reports about for year after year.
“All sorts of things” is a broad statement to toss around without at least some links. I primarily work in python and had never even heard of the py2app issue since it’s not an incredibly common tool and most python developers I know use newer versions of python.

That’s why I questioned the original broad claim: I know there are edge cases but most of the developers I know work on Macs and SIP just isn’t mentioned often enough for it to be anywhere near as bad in general as a few random commenters claim, not to mention that anyone I know who’s at all security savvy appreciates that it’s a trade off rather than a unilateral bad move.

I develop against the deployment environment run in virtual machines for two reasons.

1) Too many packages/servers/etc. I've tried to install under OS X over the years just didn't quite work right. That's probably not the case so much any more, but I have experienced it recently.

2) Developing against a macOS localhost can mask problems associated with my code running in the deployment environment. So to avoid those surprises, I develop against the deployment environment.

If I need root for package install or other server deployments, I log into the VM and do it there. I rarely need to install stuff on my macOS workstation.

What kind of work are you doing that you need to fertle around in macOS's system folders (etc) all the time?
Use Ctrl-C instead of Esc - you don't even have to move your hands off the home position