
Now, whenever you're typing a command in iTerm2, it's really easy to jump back to the start of the word (or even multiple words) to insert more text or delete part of the command - no more need for repeatedly pressing the ← key to navigate back character by character. For the “Jump to start of word” command, select the “Send Escape Sequence” action and send the escape sequence Esc+b: To configure custom keyboard shortcuts in iTerm2, open the preferences dialog and navigate to the Profiles › Keys › Key Mappings tab:Ĭlick the “+” button to add a new key mapping, or double-click an existing key mapping to edit it. For example, I typically configure the ⌥ ← shortcut which jumps me to the start of the word under the cursor. Whenever I set up iTerm2 on a new Mac, one of the first things I do is to configure familiar keyboard shortcuts for common navigation and edit actions in the command prompt. My current terminal of choice is iTerm2 which I’ve been using happily for many years.
#Iterm skip words software
Consult the readline section of the bash man page (or the readline parts of the bash info pages) for details.Keyboard Shortcuts for Jumping and Deleting in iTerm2 June 5, 2022Īs a software engineer, I find myself using the terminal every day to run all sorts of commands. You might do something like bind -P | less to find other interesting bindings. If you stopped at the end of the word (maybe via C-a M-f M-f), you could use M-DEL H i.
#Iterm skip words how to


C-m) to always execute the current line, even if an incremental search is active. But in bash, the default bindings cause RET (i.e. In normal Emacs, you would just use RET ( Return) to end the search at the current location and return to editing.Search for “Hello”: C-r H e l l o C-j (or ESC).


There are lots of ways of moving to “Hello” in your example: So, if you use few extended characters and want to have Option+ x send ESC x, then you can enable this Terminal option.
#Iterm skip words mac os x
Using this feature disables the extended character handling that Mac OS X usually provides when using the Option modifier. Terminal has an setting to automatically send ESC before keys pressed with Option held down. M- x means Meta+ x, but there probably is no Meta key on your keyboard. M-d: kill-word (delete the next ‘word’)Ĭ- x means Control+ x, so C-a is Control+ a.Here are a few of the Emacs-style key combinations that you might find handy: Probably your shell is bash and probably its command line editing style is set to “emacs”. Command line editing is a function of your shell, not of Terminal. After we are done, we may need to restart the iTerm to be able to use the changes that we just made.
