Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to configure the next activated tab after a tab is closed #5501

Open
jamessimas opened this issue Jul 15, 2022 · 3 comments
Open

Comments

@jamessimas
Copy link

jamessimas commented Jul 15, 2022

Problem description

Assume you have three tabs open in Sublime Text. Let's call them A, B and C and are opened in that order (A is first tab, B is second, etc.)

Assume Tab B is selected. Close tab B (either with CMD+W or by clicking the X button). Tab A will become the active tab.

This is confusing because it is opposite behavior of the majority of software which supports tabs. For example, try the same exercise in Firefox, Chrome, Safari, or macOS Finder, etc. When you close Tab B in them, Tab C (not Tab A) becomes the active tab.

It is confusing that Sublime Text behaves differently than most other major software which supports tabs.

Preferred solution

Provide the user with a preference by which they can change this behavior so that Tab C would become activated rather than Tab A.

This will allow Sublime Text to behave like other mainstream software which supports tabs.

Alternatives

Alternatively, you could change the default behavior but this might be jarring for people who like the current desired tab closing behavior.

Additional Information

Firefox example
Sublime Text example 2

@hartsublime
Copy link

arguably - we could also handle selection state better here and restore the selected sheets that the adjacent tab is also part of.

@aaronmader
Copy link

I'd love to have the option to return to the 'previous' tab. This would be helpful when you have many tabs open.

For example:

  1. Perform a project-wide search.
  2. Click on one of the search results, to navigate to the existing (already open) tab and scroll to line.
  3. Close the tab with ctrl-w
  4. Current result: you're now viewing some random tab. Potentially better result: return to the "Find Results" tab.

@NawfalAhmed
Copy link

NawfalAhmed commented Feb 22, 2024

My use-case is that I often open file via sublime merge from a commit and when I close that file I expect to be back to be whatever I was doing before, but I end up being lost in the sea of tabs I have open.
My recent solution to this has been that I chained close_tab with next_view_in_stack
Into a single keybind, this works as a half decent solution for me since I have many tabs open so I mostly end up landing in somewhere I expect.

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

No branches or pull requests

5 participants