Navigation in iTerm2 on Mac
Using iTerm2 for development is awesome. You can use CTRL + a to move to the start of the current line and CTRL + e to move to the end.
With long commands, it would be convenient to just jump back a few words, edit the command and then execute it. Whilst this is possible by default in iTerms2, the keys are cumbersome.
By changing the keys preset, you can get a more useful set of keyboard shortcuts.
Go to Preferences > Profiles > Keys and change the preset to ‘Natural Text Editing’.
Now you can jump back and forward on a line, one word at a time, using OPTION + left arrow and OPTION + right arrow
If you want me to look into any other tech subjects, please contact me on Twitter: @damien_hampton.
Subscribe to my newsletter
Read articles from Damien Hampton directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Damien Hampton
Damien Hampton
I'm a software developer trying to build sustainable software using Test Driven Development. I advocate for autonomous teams, continuous learning and failing fast.