Set these under iTerm2 > Preferences > Keys
control + d
Send Text with "vim" Special Chars
to
\033[6~
control + b
Send Text with "vim" Special Chars
to
\033[5~
Send Hex Code: 03
Set this in your ~/.vimrc to fix control+a
(front of line) and control+e
(end of line)
" front of line
inoremap <C-a> <C-o>0
" end of line
inoremap <C-e> <C-o>$