Reputation: 40561
It's happened a few times before that I've opened the same file twice and forgotten about it. Meaning I was editing the same file in both panes, which means two versions of the same file. This led to bugs and me not understanding why me code was not being run properly.
Is there a setting which prevents having the same file open twice?
Upvotes: 56
Views: 7905
Reputation: 2180
I submitted this PR, and you can now use the setting:
"workbench.editor.revealIfOpen": true
In the Settings GUI search for: Workbench > Editor: Reveal If Open
Upvotes: 109
Reputation: 452
It looks like under Edit-Preferences there is a checkbox for the setting, Workbench - Editor: Reveal If Open:
Upvotes: 3
Reputation: 569
Just update VS Code and if still doesn't work after update reinstall it. It happened to me and reinstalling solved my problem.
Upvotes: 1
Reputation: 40561
Afaiak this has now been fixed in the latest updates of the application, as when editing one file, the other files also updates now.
Upvotes: 0