Limits the number of open editor tabs. When the limit is exceeded, the least recently used tab is closed. Pinned, preview and unsaved tabs are never closed.
Keeps the number of open editor tabs in Visual Studio under a limit you choose. When you open one tab too many, TabLimiter closes the oldest one for you.
Works with Visual Studio 2022 and Visual Studio 2026.
What "oldest" means
You choose which time decides the tab to close:
Last foregrounded (default): the tab you least recently brought to the front.
Opened: the tab you opened first, even if you used it a moment ago.
Last edited: the tab whose text changed longest ago. A tab you never edited counts from when you opened it, so a file you just opened to read isn't the first to go.
What it never closes
The tab you're working in.
Pinned tabs. These don't count toward the limit either.
Preview tabs. These don't count toward the limit either.
Tabs with unsaved changes. These still count toward the limit, so with many unsaved tabs you can end up over it.
If TabLimiter ever does try to close a tab with unsaved changes, Visual Studio asks you whether to save, so nothing is lost. If you cancel, TabLimiter leaves that tab alone from then on.
Settings
Tools > Options > TabLimiter > General
Setting
Default
What it does
Enabled
On
Turns automatic closing on or off.
Maximum tabs
20
The most editor tabs open at once, across all windows.
Close oldest by
LastForegrounded
Which time decides the tab to close: LastForegrounded, Opened or LastEdited.
A change takes effect the next time you switch tabs or open a file.
Misc
The limit is for all editor tabs together, including floating windows and every tab group.
When you open a solution, its restored tabs are trimmed once loading finishes. Visual Studio doesn't record how recently restored tabs were used, so if more tabs come back than the limit allows, the ones kept may not be your most recent. This only happens after you lower the limit or first install TabLimiter.
For Last edited, any change to a file's text counts as an edit, including undo, formatting and Visual Studio reloading a file that changed on disk. Some non-text editors, such as image editors, don't report edits, so they count from when they were opened.