今天微软发布了Visual Studio Code文件/文件夹编辑器。
第一个限制是它似乎是一个单实例应用程序。
是否有一种方法可以获得多个实例,或者让它同时打开多个文件夹?
今天微软发布了Visual Studio Code文件/文件夹编辑器。
第一个限制是它似乎是一个单实例应用程序。
是否有一种方法可以获得多个实例,或者让它同时打开多个文件夹?
当前回答
在Windows中
按“Ctrl + Shift + P” 将光标移动到“工作区:在新窗口中复制为工作区”这一行。 单击该行上的设置图标,配置按键绑定。 为这个命令指定“Ctrl + Alt + D”(或其他你喜欢的键)。 使用“Ctrl + Alt + D”打开多个实例。
其他回答
我来这里找出如何使VSCode (Mac OS)创建一个新的窗口时,一个文件或文件夹被打开,VSCode已经在运行。和GitHub Atom一样。上面的答案没有回答我的问题,但我自己找到了答案,所以将分享。
设置: 窗口。openFilesInNewWindow -如果设置为on,文件将在一个新窗口中打开。 窗口。openFoldersInNewWindow -如果设置为on,文件夹将在一个新窗口中打开。
奖金,使它的行为像Atom:设置窗口。newWindowDimensions到最大化。
在菜单中选择“菜单文件→新窗口”,然后在新窗口中打开另一个文件夹。
要打开一个从终端加载项目的新实例,只需键入代码<directory-path>
如果你使用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.
最终结果:
我喜欢从运行提示符/对话框打开Visual Studio Code,用一个甜美而简单的cmd /c代码-n。由于运行对话框还维护每个用户的命令历史记录,因此非常方便。一键走