Last active
August 29, 2015 14:13
-
-
Save cbilgili/6efdf06635fe17e5df5e to your computer and use it in GitHub Desktop.
iterm2 sağ sol silme sekme tab gitme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm in Lion | |
with iTerm2, Zsh and Oh-My-Zsh | |
but I cannot move through words when pressing: ALT+left arrow or CMD+left arrow or something | |
instead, when I press "ALT+right arrow" it prints [C and when I press "SHIFT+ALT+left arrow" it prints D0 | |
how I can config iTerm2 to behave like any other program when moving through words? | |
********* | |
I finally found the solution to this problem here: https://coderwall.com/p/h6yfda. The necessary steps are shown below: | |
Go to Preferences, Profile, Keys. | |
Set your left ⌥ key to act as an escape character. | |
Locate the current shortcut for ⌥ ← or create a new one, with the following settings: | |
Keyboard Shortcut: ⌥← | |
Action: Send Escape Sequence | |
Esc+: b | |
repeat for the ⌥→ keyboard shortcut with the following settings: | |
Keyboard Shortcut: ⌥→ | |
Action: Send Escape Sequence | |
Esc+: f | |
***** | |
In OSX, ⌥+⌫ and ⌘+⌫ are the shortcuts for deleting a word and deleting a line respectively. By default, iTerm2 isn't configured this way, and there are a lot of misleading guides online. The following is what I've found to work on my machine. | |
Open the preferences (⌘+,) and go to the Keys tab. | |
Add a global shortcut key, and just type in your shortcut (in this case, ⌥+⌫ or ⌘+⌫) | |
In the Action dropdown, select Send Hex Code | |
The hex code for deleting a word is 0x17. | |
The hex code for deleting a line is 0x15. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment