Hacker News new | ask | show | jobs
by hagmonk 1834 days ago
Slightly younger old-timer here: I feel I've gone on the full spectrum on .emacs files and keybindings, at least for emacs versions commensurate with my own vintage.

In the early 2000s I used emacs while writing C++, I was writing Lisp macros without any idea what I was doing just purely so I could avoid using one of the bloated Motif IDEs[1] or vanilla `vi` on SPARC boxes. No vim here, thanks, and the nice IT folks at the investment bank didn't permit you to install your own software, so emacs was a fantastic end-run around their rules. We used `pine` for email because somebody had done the leg work to get it working with the corporate Lotus Notes servers, but I got email working in emacs too. Somehow. Having to actually use your windows box was either a sign of weakness or an encounter with insurmountable corporate policy. Anyway, it never occurred to me to customize the emacs key bindings. At that stage in my career I assumed some godlike personage had chosen those key bindings for a reason, and I had better just go with the flow.

Then I left emacs behind for too many years, but rediscovered it through spacemacs, which let me put off learning what I was actually doing for a few years more. Then on to doom emacs because it would make it "faster", then I finally had my epiphany and realized I would have to do this myself. Emacs of all things should not be slow, there is no excuse for it to be slow on these supercomputers we take for granted. So my config is now tangled from an org mode file to keep it nice and organized. When I add a new thing and it becomes slow, I stop immediately and figure out why. And I kind of stick to the original emacs keybindings where possible.

I have no idea what people are complaining about when it comes to RSI. My only non-negotiable change is to reassign (at the OS level) caps lock to control, simply because ctrl is such a small target on most keyboards, which are apparently made for FOLKS WHO NEED ALL CAPS way more than you or I use ctrl. Scary thought. I would argue RSI is going to come from the R part: repetitive. You spend most of your time, even when coding, just typing strings over and over. Likely the RSI suffers never learned to touch type and so the real strain comes from well established bad habits. Try using an Ergodox-EZ ortholinear split keyboard, you'll soon learn whether you're truly touch typing or not. I can't see how emacs shortcuts would be the source of pain. Maybe if you're typing on a 2000-era Sony Vaio or Nokia handset and never learned to touch type? Reminder: old curmudgeon talking here, I may have just got lucky.

If you like emacs keybindings and happen to be using macOS (which out of the box in most text fields supports the basic emacs key bindings anyway), a kind soul has put together a KeyBindings.dict that extends support even further: https://gist.github.com/cheapRoc/9670905

Mentoring newer engineers, it's remarkable how many of them are at the terminal holding down the backspace key, waiting for individual characters to be deleted over long seconds. The idea of using option-b or ctrl-a to move backwards blows their mind. Ctrl-k to delete everything forward of point is also revelatory. It's curious that they get stuck in this rut, totally dependent on the shell day to day, but wholly accepting of these inefficiencies. Yet their forebears - who actually wrote and hacked on these shells, if anything went overboard giving you ways to do everything they could conceive of with the bare minimum of keystrokes. How many of them know you can hit ESC-t to transpose the two previous words in bash? (M-t in emacs for the same).

I'm tempted to blame the children but honesty if you give a child a claw hammer and they point at the end with the V shaped prongs and say "what is that for?" you will explain it to them, or they will eventually figure it out. Maybe its purpose will never occur to them, but it's a rare user of hammers who has driven nails but never encountered the need to reverse that operation. How exactly do we design software such that someone notices the existence of option-b and how much time it could save them?

Maybe it's all the fault of the mouse? Better yet: Windows and the mouse!

[1] I'm sure you can empathize with a feeling of horror that once upon a time, Motif felt bloated and slow. Perhaps we are doomed to always be at war with slow abstractions, independent of the hardware capabilities.