I want to use ⌘ + ← to go to the first character of line and ⌘ + → and similar shortcuts in iTerm2 but couldn't find a straight forward way to make that configuration.
I want to know if there is a one stop solution to fix this problem. Manually adding each keymap is too cumbersome.
Solved this by adding going to
Preferencesby typing⌘ + ,and going to theProfilestab. Selecting theKeystab in the subsection. Going toPresetsat the bottom and selectingNatural Text EditingProfiles -> Keys -> Presets (bottom) -> Select "Natural Text Editing" option