Command line string navigation cheat sheet

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:

https://clementc.github.io/blog/2018/01/25/moving_cli/

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 – Bleft arrow
Alt – BAlt – left arrow
Ctrl – Fright arrow
Alt – FAlt – right arrow

which framed with his same visual way would be:

B & F lateral char/word movements with arrow keys
  •  
  •  
  •  
  •  
  •  

https://sresc.io/tMG

Leave a Reply

Your email address will not be published. Required fields are marked *