When you [single-]click a file in the left sidebar's file browser or open it from the quick open menu ( Ctrl - P , type the file name, Enter ), Visual Studio Code opens it in what's called "Preview Mode", which allows you to quickly view files.
(当您在左侧工具栏的文件浏览器中单击[单个]或从快速打开菜单( Ctrl - P ,键入文件名, Enter )中打开文件时,Visual Studio Code将以所谓的“预览模式”将其打开。使您可以快速查看文件。)
Preview Mode tabs are not kept open.
(预览模式选项卡不会保持打开状态。)
As soon as you go to open another file from the sidebar, the existing Preview Mode tab (if one exists) is used. (一旦您从侧栏中打开另一个文件,就会使用现有的“预览模式”选项卡(如果存在)。)
You can determine if a tab is in Preview Mode, by looking at its title in the tab bar. (您可以通过查看选项卡栏中的标题来确定该选项卡是否处于“预览模式”。)
If the title is italic , the tab is in preview mode. (如果标题为斜体 ,则选项卡处于预览模式。)
To open a file for editing (ie don't open in Preview Mode), double-click on the file in the sidebar, or single-click it in the sidebar then double click the title of its Preview Mode tab.
(要打开文件进行编辑(即不在预览模式下打开),请双击侧边栏中的文件,或在侧边栏中单击该文件,然后双击其“预览模式”选项卡的标题。)
If you want to disable Preview Mode all together, you can do so by setting "workbench.editor.enablePreview": false
in your settings file.
(如果要一起禁用预览模式,可以通过在设置文件中设置"workbench.editor.enablePreview": false
来禁用。)
You can also use the "workbench.editor.enablePreviewFromQuickOpen"
option to disable it only from the quick open menu. (您也可以使用"workbench.editor.enablePreviewFromQuickOpen"
选项仅从快速打开菜单中将其禁用。)
Before you can disable Preview Mode, you'll need to open your Settings File .
(必须先打开“设置文件” ,然后才能禁用“预览模式” 。)
Pro Tip : You can use the Command Palette to open your settings file, just enter " Preferences: Open User Settings
"!
(专业提示 :您可以使用命令面板打开设置文件,只需输入“ Preferences: Open User Settings
”!)
Once you've opened your settings file ( your settings file should be located on the right), add the "workbench.editor.enablePreview"
property, and set its value to false
.
(一旦你打开你的设置文件( 设置文件应位于右侧),添加"workbench.editor.enablePreview"
属性,其值设置为false
。)
You can learn more about Visual Studio Code's "Preview Mode", here .
(您可以在此处了解有关Visual Studio Code的“预览模式”的更多信息。)