When I was first starting out in software engineering, it felt like there was a never-ending barrage of tooling to learn. After more than a decade in CLI environments, I still find myself constantly learning new features and fun facts - but it’s fairly rare that I learn something new that I end up using day-to-day.
I wanted to share some things I learned at relatively late stages in the game that ended up being significant productivity boosters for me - perhaps some of them are well-known, but in the spirit of this XCKD, I hope that someone reading this might pick up something new.
Or, just use Home and End like they were intended! Kids these days….
These Ctrl keys are shortcuts from Emacs - there’s a Bash settings to switch to vi-mode if you so wish. Anyway, the first Emacs was written in 1981, probably on a PDP-11, which did not have Home and End! Same reason Neovim uses “yank” instead of “copy”.
ctrl-c
/ctrl-v
did not exist as a shortcut back when vi was being written!I know you didn’t intend to be mean or anything, but maaaaaan kids these days don’t know their history (not entirely your fault, btw)😆
This tip is super useful to me because not everyone is using a PC. On a PC sure, I would use the Home and End keys all the time. Now I’m using a laptop as my main computer and the Home and End keys are in a weird position that even to this day, 4ish years of laptop use, I still have to actually look at the keys to find them.
That’s horrible for muscle memory, every time I switch desk/keyboard I have to re-learn the position of the home/end/delete/PgUp/PgDn keys.
I got used to
Ctrl-a
/Ctrl-e
and it became second nature, my hands don’t have to fish for extra keys, to the point that it becomes annoying when a program does not support that. Some mapCtrl-a
to “Select all” so, for input fields where the selection is one line, I’d ratherCtrl-a
thenleft
/right
to go to the beginning/end than fish forhome
/end
, wherever they are.