-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Description
(I am filing this as a feature request and not a bug report, because I don't want to assume that it is incorrect or unexpected behavior. I am just trying to explain why the existing options for hiding tabs don't work for me. I leave it up to the maintainers to decide whether the existing behavior is reasonable, and whether this should replace the existing behavior of showTabs: false or be a new setting.)
Background
As of VS Code 1.80.1, when you set "workbench.editor.showTabs": false. it seems that it only hides the tab bar, and most of the UI still behaves as if there are tabs. For example:
-
If you close the "current tab" (e.g. Ctrl+W or middle-clicking the tab bar that now shows a single tab), then it picks one of the other recently-opened files to display.
-
If you make changes to a file without saving, and then open another file in the same pane, the changes don't seem to be saved immediately. In this state, if you try to close the workspace or open another workspace, a dialog will pop up asking if you want to save the changes to the file that was previously open.
-
If you toggle
"workbench.editor.showTabs"betweenfalseandtrue, the tabs are preserved, and will also include any files opened while it was set tofalse.
All of these behaviors seem to imply that VS Code still uses tabs in the backend, but only shows the user one tab in each pane. This is not a great experience.
Personally, I want to disable tabs to try to improve focus / reduce visual clutter. However, if the tabs are just hidden, it actually makes things worse because all the mess is still there but invisible. While using this setting, I often accidentally leave unsaved changes in the background, which affects every other operation that may depend on the changes in that file (compiling, running, version control, and other command-line interactions).
Proposal
As the title describes, I would like a mode that completely disables tab functionality. In particular:
-
When the user closes a "tab" with tabs disabled, treat it as if their intent is to close the entire pane. There should be no tabs open in the background to take focus, because there should be no tabs.
-
Nothing should ever be left open and unsaved in the background. If the user tries to open another file in a pane where the current file has unsaved changes, then immediately prompt them to save/discard/cancel.