With iTerm2 on Mac, how to delete forward a word from cursor on command-line?
Preferences → Profile → Keys add the following shortcuts: ⌥← Send Escape Sequence Esc+ b ⌥→ Send Escape Sequence Esc+ f ⌘← Send Escape Sequence Esc+ [H ⌘→ Send Escape Sequence Esc+ [F ⌘←Delete Send Hex Code 0x18 0x7f (add bindkey “^X\\x7f” backward-kill-line to .zshrc if you use zShell) ⌥←Delete Send Hex Code 0x1B 0x08 … Read more