简体   繁体   English

键盘快捷键可将文件从VSCode中移出预览模式

[英]Keyboard shortcut to take file out of preview mode in VSCode

If I quick open a file using the quick open menu, is there a keyboard shortcut that will take the opened file outside of preview mode so that when I open a new file it won't replace the currently open one? 如果我使用快速打开菜单快速打开文件,是否有键盘快捷键会将打开的文件带到预览模式之外,以便在我打开新文件时不会替代当前打开的文件?

(I'm looking for a keyboard shortcut as opposed to double-clicking the filename or tab in order to keep my workflow keyboard oriented) (我正在寻找一种键盘快捷方式,而不是双击文件名或标签以使我的工作流键盘保持方向)

Try the View: Keep Editor command (default shortcut Ctrl + K , Enter ): 尝试使用“ View: Keep Editor命令(默认快捷键Ctrl + K按Enter ):

Note: this shortcut is a chord , meaning that Enter must be pressed after releasing Ctrl + K . 注意:此快捷键是一个和弦 ,表示必须在释放Ctrl + K之后按下Enter键

As of v1.19 (released in December 2017) Alt + Enter opens the file (after Ctrl + P ) NOT in preview mode but in a "permanent", touched status. 从v1.19(于2017年12月发布)开始, Alt + Enter将打开文件(在Ctrl + P之后 ),而不是处于预览模式,而是处于“永久”的触摸状态。

Related question: How do I configure Visual Studio Code to open files always in a new tab? 相关问题: 如何配置Visual Studio Code以始终在新选项卡中打开文件?

If you would rather open the file directly from Quick Open (skipping the preview mode altogether), you can change this in the settings or add this to settings.json : 如果您希望直接从“快速打开”中打开文件(完全跳过预览模式),则可以在设置中更改此文件或将其添加到settings.json

"workbench.editor.enablePreviewFromQuickOpen": false

If you want to disable previews for other means of opening files (like the project explorer), this will do the trick: 如果要禁用其他打开文件方式的预览(例如项目资源管理器),则可以做到这一点:

"workbench.editor.enablePreview": false

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

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