Skip to content

Instantly share code, notes, and snippets.

@rannn505
Created January 26, 2022 23:34
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Common keyboard shortcuts for iTerm2
{
"Key Mappings": {
"0xf702-0x300000-0x7b": {
"Label": "Cursor Start ⌘←",
"Action": 11,
"Text": "0x01"
},
"0xf703-0x300000-0x7c": {
"Label": "Cursor End ⌘→",
"Action": 11,
"Text": "0x05"
},
"0xf702-0x280000-0x7b": {
"Label": "Cursor Word Left ⌥←",
"Action": 11,
"Text": "0x1b 0x62"
},
"0xf703-0x280000-0x7c": {
"Label": "Cursor Word Right ⌥→",
"Action": 11,
"Text": "0x1b 0x66"
},
"0xf702-0x220000-0x7b": {
"Label": "Select Word Left ⇧←",
"Action": 45,
"Text": "0"
},
"0xf703-0x220000-0x7c": {
"Label": "Select Word Right ⇧→",
"Action": 46,
"Text": "0"
},
"0x7f-0x100000-0x33": {
"Label": "Delete All ⌘⌫",
"Action": 11,
"Text": "0x15"
},
"0x7f-0x80000-0x33": {
"Label": "Delete Word Left ⌥⌫",
"Action": 11,
"Text": "0x01b 0x08"
},
"0x7a-0x100000-0x6": {
"Label": "Undo ⌘Z",
"Action": 11,
"Text": "0x1f"
},
"0x5a-0x120000-0x6": {
"Label": "Redo ⌘⇧Z",
"Action": 11,
"Text": "0x18 0x1f"
}
}
}
@rannn505
Copy link
Author

  • Download the .itermkeymap file 💾
  • Open iTerm2 iterm2-icon
  • Press command ⌘ + , to open preference ⚙️
  • Navigate to "Profiles" tab 👤
  • Choose your default profile - the one with the ⭐ next to him (it's called "Default" if you haven't changed anything)
  • Navigate to "Keys" and inside to "Key Mappings" 🔑
  • At the bottom, click on "Presets ..." then import 🔗
  • Select the .itermkeymap file ⌨️
  • Enjoy shortcuting ⚡
import.iterm.key.mappings.mov

iterm2-preferences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment