[英]How to prevent VSCode from opening same file multiple times?
Assume you have index.js
and service.ts
in the side explorer. 假设您在侧面资源管理器中有index.js
和service.ts
。 When I click on index.js
, it opens in a view A
. 当我单击index.js
,它将在视图A
打开。 Then I open service.ts
in a separate view B
right to the first one and keep the focus in B
and then click on index.js
in the sidebar, it also opens in B
. 然后,我在第一个视图B
的第一个视图中打开service.ts
,将焦点保持在B
,然后单击侧栏中的index.js
,它也在B
打开。 Can VS Code be configured such that instead of opening the file again, it switches to the already open one? 可以配置VS Code,以便与其再次打开文件,而切换到已经打开的文件吗?
Additionally, if I really want the file open twice, I could open it a second time by double clicking it or dragging it to the view where it isnt present already. 另外,如果我确实希望打开该文件两次,则可以通过双击该文件或将其拖动到尚不存在的视图中来再次打开该文件。
如果我理解正确,请尝试将此设置设置为true
:
"workbench.editor.revealIfOpen": true,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.