如果您没有更改任何内容,则在打开新标签时隐藏标签

Hide tabs when opening a new one if you haven't change anything

我是第一次使用 Atom。

Sublime 有一个很棒的功能,包括:

你打开一个文件,你只是看到了内容,并没有改变任何东西。 然后当你打开一个新文件时,因为你没有改变上一个文件的任何内容,那么新文件将取代上一个文件。

你收到了吗?有没有办法用 Atom 做到这一点?

这在 Atom 中捆绑的 "tabs" package 中实现为 "Preview Tabs"。转到设置 > 程序包 > 搜索 "tabs" > 单击其 "Settings" 按钮。向下滚动以勾选 "Use Preview Tabs" 复选框。

Atom 1.6 此行为是 Atom 本身内置的,不依赖于选项卡包或外部包。 "Use Preview Tabs"(如接受的答案所示)甚至不再可用

现在称为 "Pending Pane Items" 并在 Atom 1.6 release announcement 中进行了描述。

Sometimes, it can be useful to take a peek at the contents of a file without opening it in a dedicated tab. For those instances, you want pending pane items.

现在所谓的 "Pending Pane Items" 和以前的 "Preview tabs" 之间的区别也在 Atom 的讨论平台上进行了讨论:Pending panes vs. preview tabs.

现在默认启用待定窗格项目,无需激活任何东西即可使用它。对于那些不喜欢这种行为的人,可以通过取消选中 "Allow Pending Pane Items" 设置从 "Core Settings" 中禁用它: