Skip to content

Allow to configure workbench.editor.restoreViewState per language #101110

@OliverJAsh

Description

@OliverJAsh

When we close a file and then re-open it, VS Code will restore the cursor position.

In many cases this is desired. However, in some cases it is not, therefore it would be useful to provide a setting for this and allow it to be configured differently depending on the language being used.

For example: when I run git commit in terminal, the COMMIT_EDITMSG file will open in VS Code. Ideally my cursor would be positioned at the top so I can start writing my commit message right away. However, many times my cursor is positioned elsewhere, presumably because VS Code is trying to restore it to the position when I closed this file the last time I wrote a commit message.

This also happens when I run git rebase --interactive and the rebase todo list is opened in VS Code.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insidersverification-neededVerification of issue is requestedverifiedVerification succeededworkbench-stateUI state across restarts

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions