Toggling between chunk of input in iterm2 with "Alt + arrow left/right" writes "[D" instead jumping from chunk to chunk
Go to Iterm2 Preferences Profile Keys. Click on "load Preset..." drop down-menu Natural text editing and chose "Natural Text Editing"
after that, the command "alt + arrow left/right" should function properly