Keyboard shortcut to jump between tabs on OS X Terminal
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: The Builders
--
Chapters
00:00 Keyboard Shortcut To Jump Between Tabs On Os X Terminal
00:42 Accepted Answer Score 11
00:54 Answer 2 Score 9
01:58 Answer 3 Score 219
02:07 Answer 4 Score 25
03:04 Thank you
--
Full question
https://superuser.com/questions/131903/k...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#macos #keyboardshortcuts #terminal
#avk47
ANSWER 1
Score 219
The key combination is: Shift-Cmd-Left or Right
ANSWER 2
Score 25
It can be done from System Preferences > Keyboard > Shortcuts > App Shortcuts > click + > select Terminal.app
and add the option title as it appears in the Terminal menu, which can be:
- Select Next Tab (on Mavericks and earlier)
- Show Next Tab (on Yosemite, El Capitan, Sierra...)
Note: As you probably realize, you can do this with absolutely any [Cocoa] OSX app that has a menu with options, even if originally the app defined no shortcut for the option.
This kind of shortcuts are not equivalent to using native app shortcuts. What OSX is in fact doing is triggering the provided menu option via the label - you'll notice that while you press the keys the corresponding menu item will flash in the menu bar.
After years of resisting the idea of using a third-party terminal i finally switched to iTerm2 primarily because of properly working window split which in the ootb Terminal.app is not very useful. Also the shortcuts are fully configurable, making it possible to achieve anything you want, including switching to a specific tab with ⌘+[tab number] to jump to the Nth tab.
ACCEPTED ANSWER
Score 11
Ditch Terminal and use iTerm. It lets you do this and is, to me anyway, a bit more useful.
ANSWER 4
Score 9
I've been using Spark for years. It lets you overwrite shortcuts of any application, such as Terminal and Safari. I use it to make both programs switch tabs with command+n where n is the tab number, from 1 to 9.
After you download and copy Spark.app to /Applications
, start it, click All Applications' Hotkeys to expand the menu on the left, and click on the plus sign to add new application.
Add Terminal (from /Applications/Utilities/Terminal.app
). Next thing is to create the shortcuts: click File->New HotKey->AppleScript (or just hit command+1). Click on the shortcut area and hit command+1, name it tab1 and use this code:
tell front window of application "Terminal" to set selected tab to tab 1
Repeat it for command+2 to command+9. If you want the ability to vertically maximize the terminal, create a new shortcut like command+shift+m, name it whatever you want and use this code:
tell application "Finder"
set _b to bounds of window of desktop
end tell
tell application "Terminal"
tell front window
set {_x, _y, _w, _h} to (get bounds)
set _vz to item 4 of _b
set bounds to {_x, 10, _w, _vz}
end tell
end tell
Same thing for Safari on tab shortcuts, but the code is a bit different:
tell front window of application "Safari" to set current tab to tab 1
Honestly, I can't use either Terminal or Safari without this.