Ryan Mortier
Ryan Mortier

Reputation: 883

How do I stop VScode from remembering the saved state of closed files?

Specifically, I don't want vscode to remember my cursor position or code folding in files that I've closed out of. I've looked all throughout the settings and can't seem to find it.

Upvotes: 4

Views: 1824

Answers (1)

Mark
Mark

Reputation: 182601

The functionality you are looking for was added in v.1.28.0. See release notes: do not restore state.

VS Code has always remembered the view state (cursor location, folded sections, etc.) of a file even after the file was closed. There is now a new setting workbench.editor.restoreViewState to drop this view state when a file is closed. This allows you to always start at the top of the file after reopening it.

Upvotes: 8

Related Questions