Hacker News new | ask | show | jobs
by anyfoo 475 days ago
tmux changed screen's C-a prefix to a more sensible C-b. C-a is pretty universally used as "jump to beginning of line", which for screen meant that you'd have to git "C-a a" instead all the time. Seriously annoying, and therefore lots of screen configs changed the prefix away from C-a for that reason.
2 comments

Okay, but C-b is "go back one char" and that's also pretty common? I'd personally lean towards saying maybe either C-z or C-s are better? Because suspending a process is a lot less useful when you've got a full multiplexer, and C-s is just... I guess somebody uses it, but I don't think I've ever used it on purpose and it's kind of annoying to accidentally freeze your terminal (and again, tmux has an actual scrollback mode which seems like it covers that use).

Edit: Oh hey, https://superuser.com/questions/74492/whats-the-least-confli... is a whole discussion of options

Good point. Though C-s is fine unless you have software scroll control enabled, and it's used in emacs and anything that follows its key bindings very often as well for incremental search forward. (It's not used in the shell even though that typically implements emacs bindings, because there you usually want to incrementally search backward, i.e. C-r.) I think C-z is the perfect candidate for the reasons you mentioned.
But, go back one char is also left arrow. Why do you need another key for that?
Left arrow is not where my fingers are, but ctrl-b is.

I would have to move my whole hand over to the arrow keys, or I can use the edge of my right hand (on a full size keyboard, not laptop) to hit ctrl, and hit "b" with my left index finger.

I use F2. Unlike the arrow keys, I don't have to move my hands and I can hit it reliably. I use it enough that I want it within reach, but not so often that I need it on the home row, and all Ctrl combinations there are already tied to emacs operations in my mind.
Same reasons you might need Ctrl-a instead of Home...

1) Some keyboards don't have it, or have it in an awkward place. Most Android on-screen keyboards don't have it (good time to plug Hacker Keyboard). The gestures on Blackberry (e.g. Android) physical keyboards act like scroll-wheel movements rather than cursor keys.

2) Some shells/systems/terminal emulators/some TERM= settings/etc. just don't handle cursor or home/end keys in the console, and instead splat out garbage like: ^[[C^[[D^[[7~^[[5~

What, and move my entire hand to the far side of the keyboard like some sort of savage? (But seriously, I actually do prefer avoiding moving my hands for ergonomic reasons.)
You should do whatever you want with your hands, but you should be aware that not moving your hands is bad for ergonomics. It promotes static posture and staying in one position for too long can cause muscle stiffness and strain. Moving around promotes blood flow and reduces fatigue. Consistent doing a small set of motions (ie never moving your hands) is what leads to RSI.

Of course, a bad setup is a bad setup, and if you're moving your hands a lot because your workspace is poorly setup, you'll also have issues.

For best results, you'll want to keep your hand movements natural and comfortable and your tools within easy reach. Take short breaks to move your hands, as well as your entire body.

What about effortless manipulation? I have CapsLock as Control and shell manipulation has become easier with readline keybinds. I can touchtype but, the extra keys are always at a different place so I don't bother learning their emplacement. So I rest my hands, but I prefer those keybinds because the already short typing bust is even shorter.
I feel like the real alternative is backspace and replace, personally XD
We didn’t have arrows back then
I can easily tap C-a with one hand with very minimal hand position change.

C-b requires me to move my whole hand to reach both keys with my left hand.

Thus: C-a wins