Thanks to Clément Chastagnol for making a very useful cheatsheet for horizontally navigating a string in terminal, which you shall print and attach under your monitor, you can find it on his blog:
I made a handy diagram.https://t.co/PbO8agg6to pic.twitter.com/ld3egOzwp0
— Clément Chastagnol (@HerrDoktorFunk) January 25, 2018
Meta key mapping
To be used properly, the “meta” key has to be available as “modifier” to the CLI app you’re using, on each OS and CLI app the procedure may be different, a comprehensive list:
https://www.emacswiki.org/emacs/MetaKeyProblems
On Mac’s Terminal app, it’s a checkbox in the app’s Preferences > Profiles > Keyboard settings.
Short cuts with arrow keys
Some of the above mentioned shortcuts can be achieved also with the more intuitive arrow keys, eg to jump to the start/end of a word or between words:
Ctrl – B | left arrow |
Alt – B | Alt – left arrow |
Ctrl – F | right arrow |
Alt – F | Alt – right arrow |
which framed with his same visual way would be: