Is it possible to move between words in iTerm using Alt + Right/Left Arrows ? Now if I press Alt+Left I will get '[D' and '[C' if I press Alt+Right.
Go to iTerm Preferences → Profiles, select your profile, then the Keys tab. Click Load Preset... and choose Natural Text Editing.
Go to iTerm Preferences → Profiles, select your profile, then the Keys tab. Find ⌥← and ⌥→ and set them to send escape sequence
b and send escape sequence
If you use ⌘→ and ←⌘ you will need to remap the next and previous tab shortcuts which are set to those as default. Terminal uses ⇧⌘→ and ⇧⌘← for these.
You can do this under Profiles, or just globally under Keys (shown below) if you wish to set it globally. Note that settings in Profiles override global settings in Keys.
If you use bash, you can also add
"\e\e[D": backward-word "\e\e[C": forward-word
Go to: Preferences > Profiles > Keys
Look for the actions of ⌥← and ⌥→. They would have been mapped to: Send Hex codes
Change them to Send Escape sequence with Esc+B for backward and Esc+F for forward.
CMD+Delete -- Send Hex Code -- 0x15
To delete the whole line (similar to Option+U)