
Simple Tab Saver
The simplest Visual Studio extension for saving and restoring opened document tabs. Built to do one thing well and nothing more. Inspired by Workspace Manager.
Supports Visual Studio 2022 and Visual Studio 2026.
What it does
Saves the currently open document tabs into a per-solution JSON file and restores them later in the same visual order. Each save captures: tab order, pinned status, cursor line number, the active tab, and (optionally) breakpoints. Multiple named tab layouts per solution are supported and selected from a toolbar dropdown. File paths are stored relative to the solution so tab layouts are portable across machines.
What it deliberately does NOT do
- No tab groups or split-window topology preservation.
- No floating windows or multiple main windows.
- No cursor column, selection length, or scroll position (only cursor line).
- No bookmarks.
- No breakpoint conditions, hit counts, filters, or actions (only simple enabled/disabled breakpoints).
- No auto-restore on opening solution or other triggers.
- No auto-creation of tab layouts from git branches or other triggers.
If you need any of the above, you have to use a different extension. Most of those features were evaluated and rejected for the same reason: the only available implementation paths are unreliable and can silently corrupt saved tab layout. Simple Tab Saver has intentionally limited scope and will only be maintained to preserve compatibility with new Visual Studio versions.
Save and restore are not instant. A wait dialog is shown for both operations, duration scales with open-tab count and solution size. This is a deliberate trade-off: every step uses the stable, proven VS API instead of the broken IVsUIShellDocumentWindowMgr or a custom reimplementation of the document engine. Correctness is valued over speed. The extension is unlikely to get faster, and that is by design.
Features
- Customizable Toolbar with a tab layouts dropdown and
New / Save / Restore / Management buttons, plus default Ctrl+Alt+T chord keybindings for every action.
- Per-solution JSON storage by default at
<SolutionDir>\.tablayouts\<name>.json, storing relative file paths (whenever applicable).
- Visual tab order preservation via UI Automation against the actual document tab strip, including pinned-first ordering and the active tab.
- "Insert new tabs to the right" awareness so the restore order matches your VS environment setting.
- Tab layout management menu: Rename, Duplicate, Merge (combine tabs from multiple tab layouts), Hide, Star (fix to top), and Delete.
- Starred and hidden layouts with dropdown prefix glyphs, starred layouts always put at the top regardless of the configured sort.
- Autosave on solution close writes the current open tabs to a configurable Autosave tab layout name so the previous session can be manually restored next time.
- Optional breakpoints capture on save and toggling on restore in wipe-and-replace mode, with a Yes/No prompt before overwriting existing breakpoints. A line-text anchor self-corrects the saved line number when the file has been edited between save and restore.
- Optional expand-everything on restore unfolds every collapsible outlining area (
#region directives, collapsed methods, classes, comments) in restored tabs.
- Crash diagnostic dumps and session logs written to the extension's own installation folder (
Temp\ and Logs\ subfolders). Size-capped. No telemetry, no upload.
- Free, no expensive licensing, no subscriptions, no data collection.
Tabs relocation and rename detection
When a restored tab layout points to a file that no longer exists at the saved path, the extension attempts to locate it automatically via:
- Relocation: exact file name (including extension) match anywhere else in the solution tree (except in configurable excluded directories).
- Rename: same-extension file in the original directory with a similar base name (default 75% match, configurable 50-99%).
When a candidate is found, a dialog offers to adopt the new location. If multiple candidates match, a picker dialog provides an option to choose the right one.
Automatic backup and recovery
Every user-initiated save (Save button, Create New overwrite, Autosave on close, Merge into same layout) can automatically copy the pre-update tab layout file into a .backups\ subfolder under the storage directory, keeping a configurable number of timestamped copies per layout (default 5, up to 999). Recovery is deliberately semi-manual: copy the desired backup from .backups\ back into the storage root, then click Restore. The extension detects the staged backup, prompts Yes/No, and on Yes overwrites the main file from the backup contents.
Customization
Available in Tools > Options > Simple Tab Saver, or via the Options entry in the Management menu.
- Storage location for tab layouts: at solution root (default) or an external directory with per-solution subfolders. Solution-root folder name is configurable and can be created with the Hidden file attribute.
- Sort order and direction for the tab layouts dropdown: Alphabetical, Created Time, Last Saved Time, or Tab Count.
- Show hidden tab layouts in the dropdown (they appear with
⊘ prefix).
- Save breakpoints in tab layout toggle.
- Expand everything on restore toggle.
- Autosave enable/disable and configurable tab layout name.
- Automatic backup enable/disable, backup count cap (1-999), and a separate toggle for whether Delete also removes the backup archive.
- Confirmation prompts for save overwrite, restore closing existing tabs, delete, hide, breakpoint refresh, and tab-count drop - each individually toggleable.
- Relocation and rename detection each independently toggleable, plus a configurable match-percentage threshold for rename detection.
- Excluded directories for the relocation search, pre-configured with sensible defaults (
bin, obj, packages, node_modules, .git, .vs, etc.) and fully editable.
- Add
.tablayouts/ to .gitignore automatically on first folder creation (appends only to an existing .gitignore, never creates one).
- Pre-select last-saved layout on solution load so Save / Restore / Management buttons are immediately available against the previously used tab layout.
- Default name for the first tab layout in a fresh solution.
- Session logging enable/disable, with a separate verbose toggle for low-level diagnostic output.
License
Released under the MIT License. Source code is not publicly hosted. Feedback and bug reports are welcome via the Marketplace Q&A but are handled on a best-effort basis with no guarantees.
| |