Tab Behavior
When you open a table or view from the connections tree, DBCode opens it in a tab. By default it follows VS Code’s preview-tab convention: a single click opens the item in a tab that gets reused the next time you open something. Once you interact with the tab (apply a filter, sort, paginate, etc.) the tab is “locked” and won’t be reused.
If you’d rather every click open a fresh tab, you can change this with a setting.
The dbcode.tabPreview setting
Section titled “The dbcode.tabPreview setting”Three values:
inherit(default) - follows your VS Code settingworkbench.editor.enablePreview. If you’ve turned VS Code’s preview tabs off, DBCode does the same for tables and views.enabled- always use preview tabs, even if VS Code’s preview is off.disabled- never use preview tabs. Every click opens a new tab.
Open the VS Code Settings UI and search for “tab preview” to find the setting under DBCode > General.
Auto-locking on interaction
Section titled “Auto-locking on interaction”When preview is on, DBCode locks the tab the moment you do any of the following, so your customizations stick around when you open the next table:
- Type in the WHERE filter input (even before you apply it)
- Apply a WHERE filter
- Sort by a column
- Apply or change a column filter
- Paginate to a different page
- Resize a column
- Reorder columns
- Scroll away from the top
- Edit a cell
Any of these mark the tab as “in use” and the next click in the connections tree opens a fresh tab rather than replacing this one.
Tip: Force a new tab
Section titled “Tip: Force a new tab”You can also force a new tab without changing the setting:
- Double-click the table in the connections tree. (Note: this also expands the tree node.)
- Or set
workbench.list.openModetodoubleClickso single-clicks become navigation only and double-clicks open.
Why this exists
Section titled “Why this exists”DBCode used to always open every table in a new tab, which led to a lot of tabs piling up if you were exploring schemas. The current behavior matches how VS Code handles file tabs: peek at things with single clicks, lock them in when you start working. The auto-lock triggers above ensure your in-progress work is never lost to a casual click on another table.