简体   繁体   中英

How to prevent VSCode from opening same file multiple times?

Assume you have index.js and service.ts in the side explorer. When I click on index.js , it opens in a view 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 . Can VS Code be configured such that instead of opening the file again, it switches to the already open one?

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,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM