- To move cursor word-by-word backward: Mapped Option + Left Arrow key to "Send Escape Sequence" and b
- To move cursor word-by-word forward: Mapped Option + Right Arrow key and "Send Escape Sequence" and f
- To move cursor to the beginning of the sentence: Mapped Option + Up Arrow key to "Send Hex Code" and 1
- To move cursor to the end of the sentence: Mapped Option + Down Arrow key to "Send Hex Code" and 5
- To delete a word-byword ( backward-kill-word ): Mapped Option + BackSpace key to to "Send Hex Code" and 17
The keybindings can be changed from Preferences > Keys (or Preferences > Profiles > Keys). Since the profile level shortcuts were not useful I got rid of most of them from Preferences > Profiles > Keys.
Additionally, these built-in shortcuts will be useful:
Additionally, these built-in shortcuts will be useful:
- Ctrl a : Goto the beginning of sentence.
- Ctrl e : Goto the end of the sentence.
- Ctrl w : Delete words backward.
These were couple of useful articles helped me to fix this:
3 comments:
Thanks for this tutorial, straight forward and very helpful!
Worked perfectly. Very simple and useful, thank you.
For deleting the whole line before the cursor, send hex code: 0x15
Source: http://stackoverflow.com/questions/15733312/iterm2-delete-line
Post a Comment