Tab Switching in Terminal
If you’re like me then you no longer use multiple windows in Terminal.app at all, relying on tabs in a single window instead. Unfortunately this makes the hotkeys for switching between windows somewhat useless, so I did this SIMBL plug-in a while ago to change ⌘1-9 to switch between the tabs in the current window instead. I completely forgot to post it, but you can now download it here. See this post for how to install.
Of course with iTerm you wouldn’t need to rely on an unsupported input manager that might easily break next time Apple releases a system update—and even if it doesn’t break, it might have unforeseen side-effects and break other things. These days I try to steer clear of these things.
And don’t get me started with “Terminal.app“—I’ll leave that to Chairman Gruber …
Very nice. I’ll be using tabs more in Terminal now.
I use these shortcut keys all the time in Firefox to switch tabs. Does anyone know if there is anything similar for Safari?
Sadly, Safari’s annoying because cmd-1 – 9 selects the pages from your bookmarks toolbar.
I also wish that there was a standard for tab switching. Safari use cmd-shift-{, Adium uses cmd-left, TextMate uses cmd-opt-left
Matt, just an fyi.. in Adium you can use cmd1-9 as well.
Matt, I also hope for a standard.
While waiting it to emerge, you can change those keycombos from system preferences – keyboard and mouse.
I am always surprised when I read about people using tabs for terminal windows, either in Apple’s Terminal or in iTerm. Serious command-line users that don’t know about GNU Screen need to try it out. I can’t imagine switching terminal sessions any other way now.
Ciarán, you rock
This is fricking fantastic, thanks!
You can also cycle tabs left and right in Terminal.app with ⌘{ and ⌘} (listed in the Window menu), or (my preference) ⌘⇧← and ⌘⇧→.
This is great, thank you. Now Terminal.app has everything I want except 256 color support, which I can live without. I don’t suppose you’ve seen anything that does this same thing for iChat?
[...] to ‘drop in’ is sweet but most of us need more than one terminal at a time. No problem. Add tab support to your terminal. [...]
As a follow-up, is there anyway to make a similar plugin for Safari?
Is Tab Switching supposed to work on Terminal 1.5? I’m currently using Tiger and it doesn’t work. It says it has not been tested (the SIMBL bundle) on my version on Terminal. I tried to ignore that message, but I don’t get the Tab view option in Terminal preferences.
Great plugin, something the Terminal desperately needed…
But it won’t load on 10.5.2 that’s just been released. Can you issue an update? Much thanks.
@George et al, To get this working after the 10.5.2 update, just “Show Package Contents” on the TerminalTabSwitching.bundle, and navigate to Contents/Info.plist. Edit the Info.plist file and change SIMBLTargetApplications/0/MaxBundleVersion to 240 (the old value was 237). This number corresponds to the Terminal build number.
[...] Terminal Tab Switching – Original Post [...]
Great plugin! But: If you switch place of e.g. tab 3 and 4, they still match their old number. I.e., Cmd-3 switches to what is now tab 4. Could that be fixed?
finally i can ditch iterm (i’d love to use it… but cpu usage is just horrific, and it crashes all the damn time)! great work!
I don’t supposed you’d be willing to share the source-code for your bundle??
@chris – I agree that having to using an unsupported SIMBL is not ideal, however iTerm has a horrible bug in that it cannot buffer that much text and it hangs up and often crashes.
Replicate: tail -f a big log file that goes by, scroll up a little bit to halt the screen from constantly going down and following the text (example – you are perusing a specific log line) and boom, iTerm hangs and might or might not crash.
[...] http://ciaranwal.sh/2007/12/10/tab-switching-in-terminal [...]
Thanks! This is really helpful!
[...] Terminal não permite que você acesse uma aba diretamente. Com o bundle Terminal Tab Switching, basta pressionar Command + [1-9] para ir diretamente para a aba [...]
For the same thing in Safari, get Safari Commander: http://store.giraffesoft.ca/
[...] Tab Switching in Terminal [...]
[...] This post was Twitted by jezdez – Real-url.org [...]
[...] Eine der Schwachstellen ist klar die fehlende Shortcuts-Funktion für einen Tab-Wechsel innerhalb dem Apple Terminal. Wer weiterhin das Apple Terminal verwenden will findet mit auf Ciaran Walshs Blog ein SIMBL Plugin namens TerminalTabSwitching. [...]
This no longer works in Snow Leopard. Is there a work around?
To work on Snow Leopard you have to bump version number on the bundle’s Info.plist to 272 and run Terminal.app on 32bit mode (there’s a checkbox on the Get Info window)
Renato:
It worked, thanks! I just hope there will be something like SIMBL for 64 bit apps now.
SIMBL for 64bit is available (v0.9.2 and greater).
I did not get Tab Switching running using v0.9.4b though (Terminal.app running in 32bit mode) so I stepped back to SIMBL v0.8.2 which works.
Would be nice to have the Tab Switching plugin converted to 64bit!
A 64-bit version would be great.
Second for 64-bit version. Now that SIMBL + Visor are all 64-bit, this is the only thing holding me back!
Keyboard shortcut to switch between tabs in Terminal.app on Mac…
Use Command Shift < or Command Shift > Thanks to comments at…
It’s trivial to grab the source and compile as 64 bit for 10.6. I’ve pushed what I used to my fork @ http://github.com/octopod/terminaltabswitching. The Info.plist is now lying about the minimum terminal version, so don’t try and use on leopard
Cheers,
Chris
@Chris McGrath,
There’s something wrong when running on 64bit mode…
I can only change tabs after I select another program and changing back to Terminal.app… I’ve put some debug on xcode and updateTabListMenu isn’t being called on new tab creation…
Did you get the same behavior?
I made a tiny patch for 64-bit support and fix new tab bug. http://www.piu.fm/terminaltabswitching.sl.patch
[...] Terminal – with Ciarán’s terminal tab switching bundle [...]
@Alex
Patch’d version still isn’t working for me. Any suggestions?
Any chance to get an explanation on how to compile the source?
Best would be if someone could do it and just post the compiled version I suppose.
I compiled this for Snow Leopard, you can download it here:
http://github.com/dabeeeenster/TerminalTabSwitching
[...] [...]
[...] Ciarán Walsh?s Blog Tab Switching in Terminal – The plugin. Read the original here: Cycle Terminal Tabs with Numbers [...]
[...] Cmd+[1-9] Tabbing in Terminal – nuff said. [...]