Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
637 views
in Technique[技术] by (71.8m points)

visual-studio-code - 始终在新标签页中打开文件(Open files always in a new tab)

I am using Visual Studio Code 1.3.1 with the newly introduced tabs.

(我正在使用带有新引入的选项卡的Visual Studio Code 1.3.1。)

When I click on files, the first file will open in a tab.

(当我单击文件时,第一个文件将在选项卡中打开。)

If I do not make any changes to this file, the second clicked file will open in the same tab.

(如果我未对此文件进行任何更改,则第二个单击的文件将在同一选项卡中打开。)

How can I avoid this and make Visual Studio Code always open a new tab?

(如何避免这种情况并使Visual Studio Code始终打开新选项卡?)

  ask by MBushveld translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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的“预览模式”的更多信息。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...