Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iTerm2 swap panes keyboard shortcut

Tags:

The option for swapping between panes is only available through the menu button but I can't see any action to bind to this action. Is there and in built command that allows to swap panes?

like image 845
tushar Avatar asked Jan 25 '17 12:01

tushar


People also ask

How do I switch between panes in Terminal?

Switching between panes The terminal allows you to navigate between panes by using the keyboard. If you hold the Alt key, you can use your arrow keys to move your focus between panes. You can identify which pane is in focus by the accent color border surrounding it.

How do you switch between panes on a Mac?

Try hitting Command + Tab — a pop-up will appear showing every app that currently has windows open on your computer. Press Tab to cycle through them, and release Command when you've highlighted the one you want to switch to.

What is the shortcut to open command prompt on Mac?

Press Command + Space Bar on your Mac keyboard (alternatively, press F4) Type in “Terminal”


2 Answers

If you mean switching focus between panes:

⌘ + ⌥ + ← and ⌘ + ⌥ + → 

or

⌘ + [ and ⌘ + ] 

If you mean swapping the positions of the panes, it can only be done from the right-click menu:

  1. Right-click pane to swap from, it turns red
  2. Click on pane to swap to

There is no keyboard shortcut for this according to gitlab issue

like image 113
chrisxrobertson Avatar answered Nov 07 '22 11:11

chrisxrobertson


Correction for the second part of the selected answer:

If you mean swapping the positions of the panes, it can only be done from the right-click menu:

  1. Right-click pane to swap from, it turns red
  2. Click on pane to swap to There is no keyboard shortcut for this according to gitlab issue

You can set it on your own.
Go to iTerm2->Prefrences->Keys.
On the bottom you will find a plus sign - press it to add a keyboard shortcut.
You can choose from a variety of actions - including "swap position with split screen".

like image 39
Yonti Avatar answered Nov 07 '22 12:11

Yonti