355

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?

Calvin Cheng
  • 35,640
  • 39
  • 116
  • 167
  • 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

685

From the documentation:

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

lucasoldaini
  • 137
  • 9
Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
  • 69
    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
  • 38
    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
174

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

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
George
  • 4,189
  • 2
  • 24
  • 23
  • 5
    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
116

++/// 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
  • 81,643
  • 20
  • 123
  • 127
7

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
  • 525
  • 5
  • 8
  • 2
    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
  • This answer works best and is most intuitive! Thanks – noBillSide Mar 23 '22 at 10:40
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
  • 3,262
  • 1
  • 32
  • 28
0

Spanish ISO:

  1. ++[ goes left top
  2. ++] goes bottom right
Marco
  • 59
  • 10
David Casanellas
  • 815
  • 2
  • 11
  • 18