今天微软发布了Visual Studio Code文件/文件夹编辑器。
第一个限制是它似乎是一个单实例应用程序。
是否有一种方法可以获得多个实例,或者让它同时打开多个文件夹?
今天微软发布了Visual Studio Code文件/文件夹编辑器。
第一个限制是它似乎是一个单实例应用程序。
是否有一种方法可以获得多个实例,或者让它同时打开多个文件夹?
当前回答
也可以用空文件名创建快捷方式
"%LOCALAPPDATA%\Local\Code\Code.exe" ""
其他回答
2019年,它将自动打开一个新的会话,vs-code的新实例。 根据类型
C:\Apache24\htdocs\json2tree>code .
在命令窗口中,在项目根文件夹下。
第一张CD到你的项目文件夹,
C:\Apache24\htdocs\json2tree>
然后,类型
code .
如果你把所有的JavaScript文件放在一个文件夹下的多个文件夹中,效果很好,这就是我所做的:
从0.9.0版本开始,我们添加了一个新的设置窗口。reopenFolders来控制Visual Studio Code是否应该恢复前一个会话的所有文件夹。
默认情况下,只会恢复您使用过的最后一个活动窗口,但如果将此设置更改为“全部”,visualstudio Code将自动重新打开其窗口中的所有文件夹。
如果每个VS Code窗口通过不同的路径打开文件夹,则可以在同一个有效文件夹上打开多个VS Code窗口。例如,在Windows上,C:\Git\MyProject中的项目可以在VS Code的一个实例中打开,而\MyPC\ C $\Git\MyProject则在另一个实例中打开。如果管理共享(c$)不可用或不合适,则可以构造一个显式共享来提供必要的访问。
不,这不是理想的解决方案。
如果你使用VS Code用于多种目的(c#, Python,数据库客户端等),用不同的颜色和主题在任务栏中分离每个实例是很有用的。
要做到这一点,你可以结合使用这些技巧:
For having separated icons in taskbar follow these steps (taken from https://www.reddit.com/r/vscode/comments/fkplzc/how_do_i_prevent_vscode_portable_copies_from/fkulriu?utm_source=share&utm_medium=web2x&context=3): Download portable version from https://code.visualstudio.com/docs/editor/portable (go to download page link and get proper '.zip' file), extract it somewhere and create a folder named 'data' in it (beside code.exe) to enable portable mode. Open directory {vscode_installation_dir}/resources/app Edit the file product.json with a text editor (VS Code/Notepad.exe/Notepad++ or whatever) Locate the key win32AppUserModelId Change its value to what you want it to be, and save the file: Now, if you run the executable, this modified copy of VS Code should remain separate from other VS Codes in the Windows Taskbar. For changing the VS Code theme color itself use Peacock (https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock) For changing taskbar icon you can use https://github.com/electron/rcedit (sample use: https://www.reddit.com/r/vscode/comments/fkplzc/how_do_i_prevent_vscode_portable_copies_from/fky786v?utm_source=share&utm_medium=web2x&context=3) By pining the icons to the taskbar you can use shortcut of (Win key + Numbers) to easily open and switch between them.
最终结果: