iTerm2 keyboard shortcut - split pane navigation
Solution 1
Cmd] and Cmd[ navigates among split panes in order of use.
Solution 2
Cmd+opt+←/↑/→/↓ navigate similarly to vim's C-w hjkl.
Solution 3
⌘+⌥+←/↑/→/↓ will let you navigate split panes in the direction of the arrow, i.e. when using ⌘+D to split panes vertically, ⌘+⌥+← and ⌘+⌥+→ will let you switch between the panes.
Solution 4
there is configuration in the following way:
Preferences -> keys -> Navigation shortcuts
the 3rd option: shortcut to choose a split pane is "no shortcut" by default, we can choose one
cheers
Solution 5
I was using Terminator before, so I found it convenient to re-map Alt + arrow-key to switch between the panes. This can be done in Preferences -> Keys -> Key Mappings - press the '+' button to add a mapping. Also, in my case such a mapping was already defined in Profiles, I simply removed it.
Calvin Cheng
I design and code! And here's my stackoverflow careers page: http://careers.stackoverflow.com/cv/employer/87142
Updated on July 10, 2022Comments
-
Calvin Cheng almost 2 years
I have been a long time user of the standard Mac Terminal. Decided to experiment with iTerm2 after hearing good things about it from my colleagues.
One of the more useful features I am seeing on iTerm2 is its split panes (much like vim split buffers).
In vim, I can move between split buffers using Ctrl+W+
arrowkeys
. Is there a keyboard shortcut for iTerm2 to move between panes as well? -
james_womack about 11 yearsI'm using those commands to strobe my screen to the dubstep track playing in the office.
-
Bombe over 10 yearsThis does not work with a German keyboard… better use ⌘+⌥+← or ⌘+⌥+→, see my answer below.
-
RickyCheers about 10 years@Bombe you could also try
⌘+⌥+[
or⌘+⌥+]
. That worked for me on a spanish keyboard -
Bombe about 10 years@RickyCheers nope, doesn’t work on German keyboards;
[
and]
both require additional keys to be pressed. -
Himz almost 10 yearsThis answer works best and is most intuitive!. Thanks
-
frhd over 9 yearsDamn you apple, with the complete ass-backwards German key layout!
-
ManuelSchneid3r about 9 yearsIs it possible to change this hoteky to use opt only?
-
DigitalDesignDj over 8 yearsI have changed my config a lot, but I had to set these keys up before they worked.
-
Bombe over 8 years@mrfred now if only iTerm was configurable… OH WAIT IT IS.
-
Joris over 8 yearsFor reference, if you want to remap this to e.g. Cmd-Up Arrow, Cmd-Down Arrow, Cmd-Left Arrow and Cmd-Right Arrow to nagivate accordingly between split panes, you can do this by remapping these respective keys to "Select Split Pane Above" and its Below, Left, Right companions in Preferences -> Profiles/<Your Profile>/Keys
-
Pijusn over 7 yearsThis used to work on my machine but after last OS X upgrade it stopped working as well as some other shell shortcuts (not part of iTerm). However, @Bombe 's answer with arrow keys still works and is even easier to use.
-
rexford over 6 yearsI second mrfred
-
jenkizenki over 6 yearsThis should be the best answer. This one actually helps
-
Sundar almost 6 years@ManuelSchneid3r you can add custom short cut keys in your iterm2 profile (Preferences -> Profiles/<Your Profile>/Keys). There you have actions "Select Split Pane Above", "Select Split Pane Below", "Above" "Down".
-
Cyril Duchon-Doris almost 6 years
[
and]
are also impossible to use on the french layout,⌘+⌥+arrow-keys
wins -
J. M. Habibi over 4 yearsThis, in my opinion, should be the no. 1 answer because it allows you a few options on hotkeys. Those options are: -
No Shortcut
, -⌥ + Number
, -⌘ + Number
, - and⌥ + ⌘ + Number
. It should be noted that choosing⌘ + Number
will conflict with the default key combination for switching between tabs. -
Alex Steinberg over 3 yearsIn case anyone is interested
⌘
+Shift
+D
splits panes horizontally. -
Detached over 2 yearsThis answer works best and is most intuitive! Thanks