How to delete a word in iTerm in mac os How to delete a word in iTerm in mac os shell shell

How to delete a word in iTerm in mac os


This helped me.

Delete a word - Send Hex Codes - 0x1b 0x08 or 0x17

Delete a line - Send Hex Codes - 0x15

iTerm2 delete a word shortcut


Go to your iTerm preferences select "profiles" then "key" and change your presets in "Natural Text Editing"

iTerm Preferences

It should work immediately after.

It works with iTerm version 3.3.12


ctrl + w in iTerm,

BTW, in text editors
alt + delete to delete whole previous word
fn + delete to delete next word