Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iTerm tab switching order

Tags:

focus

tabs

iterm2

A weird issue that comes up every once in a while when I have a lot of terminal tabs open and am switching between them via the keyboard is that the tabs get out of order. Normally iTerm will activate/focus the next tab to the right or the left, but sometimes I manage to screw this tab focus order up and it will jump over several before switching back to the next proper in the list of tabs.

So when I use the keyboard to switch between tabs using Command-left_arrow or Command-right_arrow and the tabs are out of order they may end up jumping back and forth down the line of tabs. I've yet to figure out how I get them out of this order in the first place.

Is there a way to fix this other than quitting iTerm and restarting? How do I do this in the first place?

like image 561
dcmbrown Avatar asked Aug 20 '15 17:08

dcmbrown


People also ask

How do you switch tabs in iTerm?

Use the keyboard shortcuts Shift + Command + ] and Shift + Command + [ to switch to next and previous tabs respectively. The same are also available under iTerm2 Menu Bar → Window menu. The keyboard shortcuts remain the same irrespective of the shell you are running.

How do I open multiple tabs in iTerm?

You can make multiple selections by holding down shift or cmd and clicking on profiles. The "New Tabs in New Window" button is enabled only when more than one profile is selected: it will open a new window and create a new tab for each profile selected.

How do you use item 2?

The primary use of the mouse in iTerm2 is to select text, and (by default) text is copied to the clipboard immediately upon being selected. You can click and drag to perform a normal selection. Double-clicking selects a whole word. Triple-clicking selects an entire line.


1 Answers

In Preferences -> Keys -> Key Bindings you can map iTerm tab switching shortcuts to Next Tab / Previous Tab (or any other actions you prefer).

The default is Cycle Tabs Forward / Cycle Tabs Backward.

enter image description here

like image 151
Alexei Tenitski Avatar answered Sep 22 '22 01:09

Alexei Tenitski