I’ve struggled to navigate the command line since switching to iTerm2, but Marius’s post about remapping the arrow and delete keys fixed that issue.
Go to Profiles > Keys > Key Mapping to add/alter the mappings listed below:
Shortcut | Command | Action | Send |
---|---|---|---|
⌥ ← | Jump to start of word | Send Escape Sequence | b |
⌥ → | Jump to end of word | Send Escape Sequence | f |
⌘ ← | Jump to start of line | Send Hex Code | 0x01 |
⌘ → | Jump to end of line | Send Hex Code | 0x05 |
⌥ ⌫ | Delete to start of word | Send Hex Code | 0x17 |
⌘ ⌫ | Delete entire line | Send Hex Code | 0x15 |