简体   繁体   English

在 VSC 中打开文件夹时,我可以选择是替换当前窗口还是在新窗口中打开文件夹?

[英]Can I, when opening a folder in VSC, choose whether I replace the current window or open the folder in a new window?

  1. Within Visual Studio Code (VSC) I'd like to choose, on the spot, whether the folder I open replaces the current window or opens the new window.在 Visual Studio Code (VSC) 中,我想当场选择我打开的文件夹是替换当前窗口还是打开新窗口。 I already know this exists:我已经知道这存在:
  • The `--new-window --reuse-window` CLI tags. `--new-window --reuse-window` CLI 标签。
  • A `window.openFoldersInNewWindow` setting. `window.openFoldersInNewWindow` 设置。
  • The option to do File>New Window & open it from there.执行文件>新窗口并从那里打开它的选项。

What I'm looking for is the ability to choose, on the spot, from the VSC app eg open folder...我正在寻找的是能够当场从 VSC 应用程序中进行选择,例如打开文件夹...


  1. Perhaps a solution to my problem could be found by easily toggling workspace folders.也许可以通过轻松切换工作区文件夹来解决我的问题。 What if by clicking on a folderB, all the tabs of folderA close.如果通过单击文件夹 B,文件夹 A 的所有选项卡都会关闭,该怎么办? Is something like this possible?这样的事情可能吗?

You can install the Open Folder Context Menus for VS Code extension to have two more context menus to your explorer:您可以安装VS Code扩展的打开文件夹上下文菜单,以便为您的资源管理器提供另外两个上下文菜单:

  1. Open New Workbench Here在此处打开新工作台
  2. Reopen Workbench Here在这里重新打开工作台

This can probably gives you the option you're looking for "on the spot".这可能会为您提供“现场”寻找的选项。

But my suggested way you can also take is to use the terminal to do this eg code yourDesiredFolderPath -r to force opening a file or folder in an already opened window, or code yourDesiredFolderPath -n to force opening it in a new window.但我建议您也可以采用的方法是使用终端来执行此操作,例如code yourDesiredFolderPath -r以强制在已打开的窗口中打开文件或文件夹,或code yourDesiredFolderPath -n以强制在新窗口中打开它。 (See the other options by code -h in your terminal) (通过终端中的code -h查看其他选项)

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

相关问题 打开新窗口时可以删除父窗口吗? - Can I remove parent window when opening a new window? 使用 javascript 在新的 window 中打开文件夹 - Open folder in new window with javascript 我该如何编辑 <head> 当我使用window.open打开一个新窗口时 - How do I edit the <head> when i am opening a new window using window.open 如何打开引导模式窗口弹出窗口而不是在新窗口中打开它? - How can I open a bootstrap modal window popup instead of opening it in a new window? 如何在单击链接时打开新选项卡或窗口? - How can I open a new tab or window when a link is clicked? 如何在新窗口中打开链接? - How can I open a link in a new window? 我可以用Javascript打开一个新窗口,然后单击该窗口中的一个元素吗? - Can I open a new window in Javascript and click an element in that window? 我正在尝试在新的 window 中打开 pdf 文件,并在打开 window 后打开打印对话框 - I am trying to open pdf file in new window and open the print dialog after opening the window window.open 与参数一起使用时不会打开新的 window - window.open is not opening a new window when used with parameters 我需要它在同一窗口中打开,而不是在新窗口中打开 - I need it to open in the same window and not in a new window
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM