Keyboard shortcut for cycling through tabs


In Sublime Text ctrl+tab and ctrl+shift+tab cycle through the current open tabs (forward and backwards). This seems to be missing from Atom and I can’t see any keyboard functionality that replicates this. (sure I can do command+num but that’s not always the most useful)

Switching tabs with keyboard

That was the very first thing I fixed. Go to the Atom menu > Open Your Keymap and add:

  'ctrl-tab': 'pane:show-next-item'
  'ctrl-shift-tab': 'pane:show-previous-item'

Note that this will cycle in the displayed order, not the most recently used order like ST does.


thanks @tekkub that’s almost too easy.


Why is this not the default? I know some apps use Cmd+Opt+Left and Right, but most apps (browsers, editors) that I’m aware of use Ctrl+Tab and Ctrl+Shift+Tab, so shouldn’t Atom too?


It’s a pretty common tab switching convention in OSX to use Cmd+Shift+{ and Cmd+Shift+} to switch between tabs, which is what it uses by default. This is what basically all web browsers use, which is where I spend most of my time with tabs, so the muscle memory is hard to kick. Changing this in Sublime Text 2 was the first thing I did. :smile:


Looks like browsers support multiple “defaults”, because Ctrl+Tab and Ctrl+Shift+Tab are supported everywhere as well :wink: I’m not saying it should replace the current bindings, but I think it makes sense as an addition.


Easily fixed, for sure. Not sure why anyone would prefer Ctrl-Tab and Ctrl-Shift-Tab over Cmd-Shift-{ and Cmd-Shift-}. There’s a lot more finger acrobatics involved in hitting Ctrl-Tab and Ctrl-Shift-Tab, IMO. :wink:


With Caps Lock mapped to Ctrl, Ctrl+Tab and Ctrl+Shift+Tab are one handed shortcuts with pretty much no acrobatics needed here :). The downside is that they don’t work on some keyboards, because those 3 keys have a ghosted key in them (Apple USB keyboards are an example of this. You can’t hit Caps Lock, Shift and Tab at the same time, the keyboard won’t send the 3 signals)


Yeah, remapping caps lock to ctrl is always the first thing I do when I get a new machine. That said, hitting Ctrl-Shift-Tab at once requires twisting my hand in a way that’s sort of uncomfortable. I guess you wouldn’t have to if you just smash them with your pinky. :wink:


I must be used to it by now. Don’t know if that is a good thing :wink:


When I’m tab-nav’in around my hand usually isn’t on the home row. I tend to hold down ctrl and shift with my thumb and tap tab with my index.


It’s worth noting that cmd+shift+{ and } might not be commonly known on non-English keyboard layouts. I for one had never heard of it until now (Swedish).

Thanks for the mapping @tekkub! I see the point of the English way to do it, but I’m still learning to code using an English layout.


I would really like to be able to cycle between most recently used files. Usually super helpful when editing 2 files and switching between them too often


@Alfreddd I recently pushed a package called tab-switcher which does this.


I made a package to scatch that itch:
It’s my first plugin, probably a bit buggy.


Similar :

I use neither as I have learnt to be okay with tab cycling like the browser for now :heart:


I found this package. ctrl-last-tab. It uses ctrl-tab to go to the most recent tab.


You can always use cmd + any numeric key corresponding to the # of your open tab in Atom. This functionality is also the same in most web browsers. Hope that helps.


any idea of how to cycle through different tabs when shown in a splitted window? alt + Number just switch between the tabs on the same side of the split.


hi, I’ve done this before and it worked for me, but now on a brand new installation of Atom, it doesn’t work… whyyy??

  'ctrl-tab': 'pane:show-next-item'