

- #Mac iterm move by word how to#
- #Mac iterm move by word for mac os#
- #Mac iterm move by word mac os x#
Any smart selection rule that matches that location will be searched for associated actions, and those actions will be added to the context menu.
#Mac iterm move by word for mac os#
When you right click in a terminal, smart selection is performed at the cursors location. Keyboard shortcut keys in iTerm2 for Mac OS Previous tab, Cmd+Left Next tab, Cmd+Right Close tab, Cmd+W Move tab right, Shift+Cmd+Right Move tab left. You can navigate by word using the arrow keys when combined with the option ( ⌥) key and can delete words using option + delete at the iTerm prompt, like everywhere else on the Mac. Actions may be associated with smart selection rules. In the same preferences window, scroll in the Key Mappings section until you see the ⌥← key combination and double click it to edit.Ĭhange the action to Send Escape Sequence and the value for the Esc+ input to bĭo the same for the ⌥→ key combination and this time use f for the value. Option + Right arrow ( ⌥ + →) – Move one word right.Option + Left arrow ( ⌥ + ←) – Move one word left.Next we’ll setup the arrows keys to move by word when the option key is held down. The change you just made will let your delete by word (instead of single character) at the prompt if you hit the delete key while holding down the option ( ⌥) key. Then, you can move a word backwards using Option + and a word forwards using Option +, move to the start of the line using fn + and to the end of the line with fn +. ALT + D to delete a word starting from the current cursor position. iTerm recommends using +Esc instead in the FAQ. Killing a fly with a cannon: Go to Preferences. CTRL + K to kill the line starting from the cursor position. Note: the Terminal.app equivalent of this is the Use Option as Meta key checkbox as shown in this screenshot.


Like this I get the typical mac behaviour in iTerm2, on local terminal sessions, but also on remote SSH sessions and I can use the standard ctrl-left / ctrl. Change the Left option key acts as: and Right option key acts as: to the +Esc option. The effect is that pressing alt-left or alt-right in iTerm sends a ctrl-left or ctrl-right directly to iTerm2, bypassing the usual system-wide shortcut to move a desktop left or right. At the bottom of this pane, you’ll see the Keyboard Behaviour section. Open the Preferences pane for iTerm and navigate to Profiles -> Keys. This requires making a few minor changes to the settings. The short video below demonstrates what it looks like to have that ability:
#Mac iterm move by word how to#
When I made the switch, I had to figure out how to bring over the ability to move the cursor by word or delete words at the prompt instead of one character at a time. ITerm is a great replacement for the default Terminal app on the Mac, comes with lots of nice features like horizontal & vertical spits, necessities like tmux integration and a whole lot more. I tried Alt+d but this types the delta operator symbol and doesnt delete.
#Mac iterm move by word mac os x#
Move the Cursor by Word at the Command Prompt on the Mac (iTerm) With iTerm2 1.0.0 on Mac OS X 10.6.8, Id like to delete from cursor to the next end of word, i.e.
