Uses actual column position for tab stop calculation (original used string index, giving wrong expansion mid-line)
Unifies exclusions into excludePatterns supporting language ID, exact filename, or *-glob (original only supported extension globs and a separate ignoreMakefiles flag)
Before writing a file to disk, replaces all tab characters with spaces using the editor's tabSize setting.
Tab stops are computed by column position, not a flat replacement (e.g. a tab at column 2 with tabSize: 4 expands to 2 spaces)
Exclude files by language ID, exact filename, or *-glob (defaults exclude makefile and *.go which require tabs)
Settings:
Setting
Default
Description
editorTweaks.removeTabsOnSave.enable
true
Enable the feature
editorTweaks.removeTabsOnSave.excludePatterns
["makefile", "*.go"]
Patterns to skip — language ID, exact filename, or *-glob matched against basename
Skips non-file:// entries for both workspaces and files — SSH/remote/virtual entries are never touched (original may attempt fsPath on them)
Single maxItems setting applied independently to each category: workspaces get maxItems slots and files get maxItems slots (original's keepCount is per-category but documented as a single shared limit)
Also prunes the Go-to-File (Cmd+P) editor history (not covered by the original)
Removes stale entries from both:
The VS Code recently opened list (File → Open Recent)
The Go-to-File (Cmd+P) editor history
"Stale" means the path no longer exists on disk.
Runs automatically on startup (configurable)
Also available as a manual command: Editor Tweaks: Prune Open History
Non-file:// entries (SSH, remote, virtual workspaces) in the recently opened list are always kept untouched
maxItems is applied independently to each category of the recently opened list: workspaces and files each get maxItems slots
Pruning the Go-to-File history requires the system sqlite3 CLI (available by default on macOS and most Linux distributions); if absent this part of the feature is silently skipped and only the recently-opened list is pruned
Go-to-File history pruning takes effect on the next launch (stale entries are written back to the workspace database on window close)
Settings:
Setting
Default
Description
editorTweaks.pruneOpenHistory.enable
true
Enable the feature
editorTweaks.pruneOpenHistory.runAtStartup
true
Prune automatically on startup
editorTweaks.pruneOpenHistory.maxItems
-1
Max local entries to keep per category in the recently opened list (maxItems does not trim the Go-to-File history); -1 = no limit