Hacker News new | ask | show | jobs
by zhann_dc 3129 days ago
If you use your terminal all day, do yourself a favor and learn readline shortcuts [1]. Once you have you might stop overwriting these, because imho C-a is a terrible prefix and very handy to move to the beginning of a line.

[1] http://www.bigsmoke.us/readline/shortcuts

4 comments

Do yourself a favor and learn the vi-style readline shortcuts instead [1]. Once you have you might stop assuming that everyone uses gross Emacs keybinds, because imho C-a is a reasonable prefix and not bound to anything by default.

[1] http://www.catonmat.net/download/bash-vi-editing-mode-cheat-...

This is why I love macOS so much! With the command key, there is no overlap for things like copy and paste and ctrl + c/v. Also Cocoa implements things like ctrl + a/e etc for every native textfield and textview, so I‘ve gotten really used to it.

Too bad now I‘m mostly on Windows and miss all these shortcuts. In programs where I can edit the keymapping, I usually change ctrl + a from Select All to jump to beginning of line. I barely use Select All anyway.

I use a mac, but sometimes have to use office tools. They don't use readline shortcuts and it drives me absolutely mad when I hit Ctrl-H (backspace) and the help window pops up.
`C-a, a` sends `C-a` to muxed terminal. Sure is a bit harder to remember, but not much.

IMO the biggest mistake tmux made was not using C-a by default. I don't know anybody who doesn't remap it - it's far more convenient keyboard-wise, and it sets you up for using `screen` on servers where tmux isn't installed. So go ahead and remap it.

I used Ctrl-A for years. I've since switched to Ctrl-o so I can use Ctrl-A for its readline behaviour (which is where `;` is on most keyboards), and I have Ctrl on capslock, so my prefix is a quick tap with both my pinkies.