简体   繁体   English

VSCode:在特定编辑器端打开与给定项目相关的文件

[英]VSCode: open files related to a given project on a specific editor side

I am working on a vscode workspace, and in this workspace I have two separate projects that I need to constantly open files from one or the other.我正在一个 vscode 工作区工作,在这个工作区我有两个独立的项目,我需要不断地从一个或另一个打开文件。 The explorer window on the left shows both projects, and were added using the Add folder to workspace... option if it's useful to know.左侧的资源管理器窗口显示了这两个项目,并且是使用“ Add folder to workspace...选项Add folder to workspace...如果知道的话)。

Now, since the projects have similar structure (both have an api.py file for example), I started keeping the open files from project1 on the left side of the editor, and I'm using the right side for project2.现在,由于项目具有相似的结构(例如都有一个api.py文件),我开始将 project1 中打开的文件保留在编辑器的左侧,而我将右侧用于 project2。 When I open a new file, it gets placed on the side of the screen that I have currently focused.当我打开一个新文件时,它会被放置在我当前关注的屏幕一侧。

What I would like, is to know if there's an option to force files from project1 to stay on the left, and files from project2 to stay on the right.我想知道是否有一个选项可以强制将 project1 中的文件保留在左侧,将 project2 中的文件保留在右侧。

The image below shows what I am trying to accomplish下图显示了我想要完成的工作预期结果

This issue appears to be exactly on point:这个问题似乎恰到好处:

Open files from folders in a fixed editor group .从固定编辑器组中的文件夹中打开文件

Unfortunately, it was put on the backlog candidate list and didn't get the necessary votes and so was closed.不幸的是,它被列入积压候选名单,没有获得必要的选票,因此被关闭。 So no built-in way to do this.所以没有内置的方法来做到这一点。 Might be a good extension candidate.可能是一个很好的扩展候选人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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