如何在同一个 window 中从 VSCode 文件资源管理器打开文件
How to open file from VSCode file explorer in same window
使用 cmd+shift+e
我可以突出显示文件资源管理器选项卡,然后使用 vim 键绑定到 select 给定文件。但是,我只是想出了如何在新的编辑器窗格 (Ctrl+Enter
) 中打开 selected 文件。
是否有在同一窗格中打开它的快捷方式?我可以更改 Ctrl+Enter
快捷方式的行为吗?指向正确文档的指针也会有所帮助。
来自docs
The settings window.openFoldersInNewWindow
and window.openFilesInNewWindow
are provided to configure opening new windows or reusing the last active window for files or folders and possible values are default, on and off.
If configured to be default, we will make the best guess about reusing a window or not based on the context from where the open request was made. Flip this to on or off to always behave the same. For example, if you feel that picking a file or folder from the File menu should always open into a new window, set this to on.
Note: There can still be cases where this setting is ignored (for example, when using the -new-window or -reuse-window command-line option).
最近的动作是filesExplorer.openFilePreserveFocus
,默认绑定到Space
。
这将在新选项卡中打开当前选定的文件,但不会将光标移至该文件。
不过,您可以使用 cmd+shift+e
键绑定返回您的编辑器!
使用 cmd+shift+e
我可以突出显示文件资源管理器选项卡,然后使用 vim 键绑定到 select 给定文件。但是,我只是想出了如何在新的编辑器窗格 (Ctrl+Enter
) 中打开 selected 文件。
是否有在同一窗格中打开它的快捷方式?我可以更改 Ctrl+Enter
快捷方式的行为吗?指向正确文档的指针也会有所帮助。
来自docs
The settings
window.openFoldersInNewWindow
andwindow.openFilesInNewWindow
are provided to configure opening new windows or reusing the last active window for files or folders and possible values are default, on and off.If configured to be default, we will make the best guess about reusing a window or not based on the context from where the open request was made. Flip this to on or off to always behave the same. For example, if you feel that picking a file or folder from the File menu should always open into a new window, set this to on.
Note: There can still be cases where this setting is ignored (for example, when using the -new-window or -reuse-window command-line option).
最近的动作是filesExplorer.openFilePreserveFocus
,默认绑定到Space
。
这将在新选项卡中打开当前选定的文件,但不会将光标移至该文件。
不过,您可以使用 cmd+shift+e
键绑定返回您的编辑器!