https://github.com/gableroux/iterm2-macos-dynamic-profile
🍎Fix iterm2 macos keys
https://github.com/gableroux/iterm2-macos-dynamic-profile
dynamic-profile hacktoberfest iterm2 keyboard macos
Last synced: 2 months ago
JSON representation
🍎Fix iterm2 macos keys
- Host: GitHub
- URL: https://github.com/gableroux/iterm2-macos-dynamic-profile
- Owner: GabLeRoux
- License: mit
- Created: 2018-08-01T18:48:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T20:00:12.000Z (over 5 years ago)
- Last Synced: 2025-04-30T07:06:09.230Z (6 months ago)
- Topics: dynamic-profile, hacktoberfest, iterm2, keyboard, macos
- Language: Shell
- Homepage:
- Size: 617 KB
- Stars: 95
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fix iterm2 MacOS keys
[](https://travis-ci.com/GabLeRoux/iterm2-macos-dynamic-profile)
iTerm2 has terrible defaults concerning `option + arrow`, `cmd + arrow` + `backspace` or `delete`. Here's a fixed _dynamic profile_ to fix that.
Refer to [iTerm 2: How to set keyboard shortcuts to jump to beginning/end of line? Answer](https://stackoverflow.com/a/29403520/1092815).
I followed instructions, took the first suggestion each time and generated this iTerm2 profile.
## How to import dynamic profile
```bash
git clone https://github.com/GabLeRoux/iterm2-macos-dynamic-profile.git
cd iterm2-macos-dynamic-profile
# copy the json profile to dynamic profiles folder
cp ./fix-iterm2-keys-profile.json ~/Library/Application\ Support/iTerm2/DynamicProfiles
# or create a symlink for easier updates
ln -s $(pwd)/fix-iterm2-keys-profile.json ~/Library/Application\ Support/iTerm2/DynamicProfiles/
```
* Open iTerm2 Preferences -> Profiles
* Select the new dynamic profile from the list
* Click `Other Actions` -> `Bulk Copy from Selected Profile...`
* Check `Keys` checkbox
* Select your profile
* Hit Copy button
* Enjoy a much better life with your keyboard


## ZSH bindkey fix + redo
As explained in [iTerm 2: How to set keyboard shortcuts to jump to beginning/end of line? Answer](https://stackoverflow.com/a/29403520/1092815):
See [`./fix_zsh_keys.sh`](./fix_zsh_keys.sh)
```bash
# Copy fixed keys to your dotfiles
mkdir ~/dotfiles/
cp ./fix_zsh_keys.sh ~/dotfiles/
# Add entry to your ~/.zshrc
echo 'source ~/dotfiles/fix_zsh_keys.sh' >> ~/.zshrc
# Reload your .zshrc for changes to take effect
source ~/.zshrc
```
## Related documentation
See [iterm2 dynamic profiles documentation](https://www.iterm2.com/documentation-dynamic-profiles.html) for more details.
## License
[MIT](LICENSE.md) © [Gabriel Le Breton](https://gableroux.com)