始终在新选项卡中打开文件 [英] Open files always in a new tab

查看:38
本文介绍了始终在新选项卡中打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是带有新引入的选项卡的 Visual Studio Code 1.3.1.

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

当我单击文件时,第一个文件将在选项卡中打开.如果我不对此文件进行任何更改,第二个单击的文件将在同一选项卡中打开.

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.

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

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

推荐答案

当您在左侧边栏的文件浏览器中[单次-]单击文件或从快速打开菜单(Ctrl-P,输入文件名,回车),Visual Studio Code 以所谓的预览模式"打开它,让你快速查看文件.

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.

预览模式选项卡未保持打开状态.只要您从侧边栏中打开另一个文件,就会使用现有的预览模式"选项卡(如果存在).您可以通过查看选项卡栏中的标题来确定选项卡是否处于预览模式.如果标题为斜体,则标签处于预览模式.

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 (i.e. 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.

如果您想同时禁用预览模式,可以通过在设置文件中设置 "workbench.editor.enablePreview": false 来实现.您还可以使用 "workbench.editor.enablePreviewFromQuickOpen" 选项仅从快速打开菜单中禁用它.

If you want to disable Preview Mode all together, you can do so by setting "workbench.editor.enablePreview": false in your settings file. You can also use the "workbench.editor.enablePreviewFromQuickOpen" option to disable it only from the quick open menu.

在禁用预览模式之前,您需要打开您的设置文件.

Before you can disable Preview Mode, you'll need to open your Settings File.

专业提示:您可以使用命令调色板(快捷键Ctrl+Shift+P)打开你的设置文件,只需输入Preferences: Open User Settings"!

Pro Tip: You can use the Command Palette(shortcut Ctrl+Shift+P) to open your settings file, just enter "Preferences: Open User Settings"!

打开设置文件后(您的设置文件应位于右侧),添加"workbench.editor.enablePreview" 属性,然后设置其值为 false.

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.

您可以在此处了解有关 Visual Studio Code 的预览模式"的更多信息.

这篇关于始终在新选项卡中打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆