Skip to content

feat: add tab group support (skip collapsed groups, zc/zj/zk navigation)#4858

Open
tusharmurali wants to merge 2 commits into
philc:masterfrom
tusharmurali:master
Open

feat: add tab group support (skip collapsed groups, zc/zj/zk navigation)#4858
tusharmurali wants to merge 2 commits into
philc:masterfrom
tusharmurali:master

Conversation

@tusharmurali
Copy link
Copy Markdown

@tusharmurali tusharmurali commented Mar 2, 2026

Description

Fixes #4693
Related #3937, #4639

This PR adds tab group support to Vimium:

1. Skip collapsed tab groups when navigating (J/K/gt/gT/g0/g$)

Chrome and Firefox's native Ctrl+Tab skips collapsed tab groups, but Vimium's J/K currently navigates into them. This aligns Vimium's behavior with Chrome and Firefox's native UX.

2. New commands for tab group navigation (Vim fold-style keybindings)

Key Command Description
zc collapseTabGroup Collapse current tab's group
zj previousTabGroup Switch to previous tab group
zk nextTabGroup Switch to next tab group

These follow Vim's fold navigation conventions (z prefix, j/k for direction).

Notes:

  • Adds tabGroups permission (no new user-facing permission warnings)
  • Works on any browser with tabGroups API support (Chrome, Firefox 140+); no-ops on older versions
  • Users can still access tabs in collapsed groups via T (Vomnibar tab search)

@imsodin
Copy link
Copy Markdown

imsodin commented Apr 23, 2026

Thanks for working on this!

  • Firefox: gracefully no-ops (Firefox 140+ will add tab group API support)

Just out of interest, not complaining in any way: As the code here is chrome only still and firefox does have tab groups for a while - did you check and find that these operations aren't available/possible in firefox or just only focused on chrome for now?

@philg-dev
Copy link
Copy Markdown
Contributor

philg-dev commented Apr 23, 2026

Thanks for working on this!

  • Firefox: gracefully no-ops (Firefox 140+ will add tab group API support)

Just out of interest, not complaining in any way: As the code here is chrome only still and firefox does have tab groups for a while - did you check and find that these operations aren't available/possible in firefox or just only focused on chrome for now?

According to the MDN compatibility table, the tab group related functionality that is used in this PR should also be available on Firefox:

So I personally think that there should be no distinction in Vimium regarding this feature.

Edit: the feature would obviously only work on newer Firefox versions, so it might be necessary to increase the minimum Firefox version in the manifest.json or probably less restrictive: some proper handling of cases where the API methods are unavailable (e.g. Firefox ESR versions).

@tusharmurali
Copy link
Copy Markdown
Author

tusharmurali commented May 3, 2026

Thanks for working on this!

  • Firefox: gracefully no-ops (Firefox 140+ will add tab group API support)

Just out of interest, not complaining in any way: As the code here is chrome only still and firefox does have tab groups for a while - did you check and find that these operations aren't available/possible in firefox or just only focused on chrome for now?

According to the MDN compatibility table, the tab group related functionality that is used in this PR should also be available on Firefox:

So I personally think that there should be no distinction in Vimium regarding this feature.

Edit: the feature would obviously only work on newer Firefox versions, so it might be necessary to increase the minimum Firefox version in the manifest.json or probably less restrictive: some proper handling of cases where the API methods are unavailable (e.g. Firefox ESR versions).

Thanks for flagging, I was focusing only on Chrome. I've updated the code to use chrome.tabGroups feature detection (which actually simplifies the code) so tab group commands will work on Firefox 140+ automatically (and no-op on older versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for jump over tab groups

3 participants