336

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?

Bugfinger
  • 1,198
  • 1
  • 14
  • 29
Calvin Cheng
  • 32,676
  • 29
  • 109
  • 162
  • 3
    mac shortcut of usefulness: `⌘`+`⇧`+`/` and then try a few keywords (in this case split) in the search bar. Use the `↓` to view the menu items, if there is a built-in shortcut you will see it alongside the menu item. works on most mac applications, ie Excel, sublime, firefox, etc. – Merlin Dec 06 '17 at 18:42
  • I have mixed feeling about this question ... although I think it' useful, shouldn't key bindings have a proper place to the Q/A? – Gerardo Lima Feb 12 '20 at 09:45

6 Answers6

667

From the documentation:

Cmd] and Cmd[ navigates among split panes in order of use.

lucasoldaini
  • 127
  • 8
Michael Berkowski
  • 253,311
  • 39
  • 421
  • 371
  • 67
    I'm using those commands to strobe my screen to the dubstep track playing in the office. – james_womack Apr 17 '13 at 19:15
  • 36
    This does not work with a German keyboard… better use ⌘+⌥+← or ⌘+⌥+→, see my answer below. – Bombe Dec 18 '13 at 18:15
  • @Bombe you could also try `⌘+⌥+[` or `⌘+⌥+]`. That worked for me on a spanish keyboard – RickyCheers Apr 07 '14 at 17:19
  • 4
    @RickyCheers nope, doesn’t work on German keyboards; `[` and `]` both require additional keys to be pressed. – Bombe May 15 '14 at 18:15
  • 6
    Damn you apple, with the complete ass-backwards German key layout! – frhd Oct 24 '14 at 23:14
  • This 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. – Pijusn Jan 24 '17 at 07:27
  • 2
    `[` and `]` are also impossible to use on the french layout, `⌘+⌥+arrow-keys` wins – Cyril Duchon-Doris Aug 17 '18 at 16:12
165

Cmd+opt+/// navigate similarly to vim's C-w hjkl.

L Y E S - C H I O U K H
  • 3,827
  • 7
  • 32
  • 52
George
  • 3,900
  • 2
  • 22
  • 20
  • 4
    Is it possible to change this hoteky to use opt only? – ManuelSchneid3r Apr 15 '15 at 15:00
  • @ManuelSchneid3r you can add custom short cut keys in your iterm2 profile (Preferences -> Profiles//Keys). There you have actions "Select Split Pane Above", "Select Split Pane Below", "Above" "Down". – Sundar Aug 11 '18 at 19:07
109

++/// 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.

Bombe
  • 74,913
  • 20
  • 118
  • 125
3

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

Han.Oliver
  • 384
  • 2
  • 6
  • 1
    This, 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. – J. M. Habibi Nov 14 '19 at 15:29
2

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.

Maxim Chetrusca
  • 2,939
  • 1
  • 28
  • 28
0

Spanish ISO:

  1. ++[ goes left top
  2. ++] goes bottom right
Marco
  • 51
  • 9
David Casanellas
  • 575
  • 2
  • 7
  • 15