MRU useTabSwitcher prevents switching to tabs in left/right order #12791

Open
opened 2026-01-31 03:25:04 +00:00 by claunia · 0 comments
Owner

Originally created by @johnburnett on GitHub (Mar 2, 2021).

Description of the new feature/enhancement

I was excited for the MRU tab switching in 1.5, but it looks like the way it was designed there's no way to make it behave like Visual Studio (and other text editors) and support both MRU switching and next/prev (rather: left/right) switching at the same time. What I'm attempting:

  • "ctrl+tab": switch to previous tab in MRU order
  • "ctrl+shift+tab": switch to next tab in MRU order
  • "ctrl+pgup": switch to the tab to the left
  • "ctrl+pgdn": switch to the tab to the right

The current behavior with useTabSwitcher set to "disabled" or "inOrder" is:

  • "ctrl+shift+tab": switch to tab to the left
  • "ctrl+tab": switch to tab to the right

With useTabSwitcher set to "MRU" it's:

  • "ctrl+tab": switch to previous tab in MRU order
  • "ctrl+shift+tab": switch to next tab in MRU order

And in both cases, the "useTabSwitcher" setting changes the meaning of what the "nextTab" and "prevTab" commands actually do. This causes two undesirable effects:

  • To get MRU ordering, you have to enable the tab switcher UI
  • If you get MRU ordering, that's all you get (you lose the ability to navigate to tabs to the left/right)

Proposed technical implementation details (optional)

To fix, you could expose either four new commands:

  • "leftTab"
  • "rightTab"
  • "mruNextTab"
  • "mruPrevTab"

...or four new "direction" types to the "switchToTab" action:

  • { "command": { "action": "switchToTab", "direction": "left" }, "keys": "ctrl+pgup" },
  • { "command": { "action": "switchToTab", "direction": "right" }, "keys": "ctrl+pgdn" },
  • { "command": { "action": "switchToTab", "direction": "mruPrev" }, "keys": "ctrl+tab" },
  • { "command": { "action": "switchToTab", "direction": "mruNext" }, "keys": "ctrl+shift+tab" },

...which do exactly what they describe, and accomplishes the goal outlined above. None of these commands should be influenced by the "useTabSwitcher" setting (and the "nextTab/prevTab" commands would continue to be influenced to keep existing behavior).

Originally created by @johnburnett on GitHub (Mar 2, 2021). # Description of the new feature/enhancement I was excited for the MRU tab switching in 1.5, but it looks like the way it was designed there's no way to make it behave like Visual Studio (and other text editors) and support both MRU switching and next/prev (rather: left/right) switching at the same time. What I'm attempting: - "ctrl+tab": switch to previous tab in MRU order - "ctrl+shift+tab": switch to next tab in MRU order - "ctrl+pgup": switch to the tab to the left - "ctrl+pgdn": switch to the tab to the right The current behavior with useTabSwitcher set to "disabled" or "inOrder" is: - "ctrl+shift+tab": switch to tab to the left - "ctrl+tab": switch to tab to the right With useTabSwitcher set to "MRU" it's: - "ctrl+tab": switch to previous tab in MRU order - "ctrl+shift+tab": switch to next tab in MRU order And in both cases, the "useTabSwitcher" setting changes the meaning of what the "nextTab" and "prevTab" commands actually do. This causes two undesirable effects: - To get MRU ordering, you have to enable the tab switcher UI - If you get MRU ordering, that's all you get (you lose the ability to navigate to tabs to the left/right) # Proposed technical implementation details (optional) To fix, you could expose either four new commands: - "leftTab" - "rightTab" - "mruNextTab" - "mruPrevTab" ...or four new "direction" types to the "switchToTab" action: - { "command": { "action": "switchToTab", "direction": "left" }, "keys": "ctrl+pgup" }, - { "command": { "action": "switchToTab", "direction": "right" }, "keys": "ctrl+pgdn" }, - { "command": { "action": "switchToTab", "direction": "mruPrev" }, "keys": "ctrl+tab" }, - { "command": { "action": "switchToTab", "direction": "mruNext" }, "keys": "ctrl+shift+tab" }, ...which do exactly what they describe, and accomplishes the goal outlined above. None of these commands should be influenced by the "useTabSwitcher" setting (and the "nextTab/prevTab" commands would continue to be influenced to keep existing behavior).
claunia added the Resolution-Fix-CommittedArea-SettingsIssue-TaskProduct-Terminal labels 2026-01-31 03:25:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12791