How to easy fix iTerm2 text navigation (cmd+arrow)

This article was published on Apr 28, 2021, and takes less than a minute to read.

One thing which bug my mind is the default way to text navigate in iTerm2.

When you press cmd+arrow-left or option+arrow left for instance it, it throw [D key.

In the best I used to replace what key it send to be able to walk through words. However I've found a better way of doing that.

Just open iTerm2, Profiles -> Edit Profiles -> Keys. Then you click on Presets and select: Natural Text Editing.

Now we can have the same behavior as we have in other apps.

Resource