loading...

iTerm2 Shortcut Keys

changoman profile image Hunter Chang Updated on ・2 min read

iTerm2 is one of the most popular terminals out there for developers and programmers. Great as it is, the default shortcut keys can be somewhat lacking. You can add your own shortcut keys under your Profile to make iTerm2 do some amazing things.

First, go to iTerm2 > Preferences > Profiles > Keys

Here you can see the current Key Mappings. Click on the "+" button to add a shortcut combination. You'll need to enter the correct Hex Code for some of the Actions. Here is a visual:

Here are the keys I've mapped for myself:

Skipping to Beginning and End of Line:


// Skip to Beginning of Line
command + left-arrow
Send Hex Code
0x01
// Skip to End of Line
command + right-arrow
Send Hex Code
0x05

Skipping to Left and Right of a Word:


// Skip Left of Word
option + left-arrow
Send Escape Sequence
b
// Skip Right of Word
option + right-arrow
Send Escape Sequence
f

Delete Single Word:


// Delete Single Word
option + delete (The shortcut combo will look like ⌥←Delete)
Send Hex Code
0x17

Delete Entire Line:


// Delete Entire Line
command + delete (The shortcut combo will look like ⌘←Delete)
Send Hex Code
0x15

Hopefully you find these shortcut keys useful! For more tips and tricks on web development, check out my blog at https://codebushi.com

Posted on Sep 27 '18 by:

changoman profile

Hunter Chang

@changoman

Sleep Deprived Father. Senior Web Developer. Lover of all things Ramen and Kpop.

Discussion

markdown guide