32
votes

I have a project opened in Atom and, when I click on a file to open it, instead of always opening it in a different tab (as it was doing until now), now it randomly opens it in a new tab or in an existing one. Due to this behavior, it's closing files that I still want to have open.

Does anybody have a solution for this problem?

I'm using Atom 1.6.0. under Mac OS X 10.11.3

3

3 Answers

54
votes

I figured out what was happening:

If you click just ONCE in a file, Atom will open it like in a "preview" tab, you can know this because the name of the file in the tab is in italics. If you now click in another file, it'll replace the current file in the preview tab BUT if you click again in the same file, it gets opened 'for real' and next files you open won't replace this same tab.

17
votes

This feature is called Pending Pane Items, you can disable it from settings/preferences

enter image description here

In case it is enabled, there is an easy way to stick a file in preview panel

Click on the file from tree view and double click on that file afterward, you will notice the filename in tab will change from italics and it's done :)

For more, refer here https://github.com/atom/atom/issues/11243

11
votes

This feature has been introduced in Atom 1.6.0.

Basically if you open the file with a single click, you take a peek at the contents of a file without opening it in a dedicated tab. When another item is opened in a pane, it replaces the pending tab.

When you simply double-click the file or the tab, the tab is automagically made permanent for you.

See: Major Changes in 1.6.0 Stable - Pending Pane Items

Pending Pane Items

When you single-click a file from the tree view or the find-and-replace search results, the file in question opens as a pending pane item. When another item is opened in a pane, it replaces the pending tab in that pane instead of being appended to the list of tabs. This allows you to quickly click through several files quickly without opening each of them in a dedicated tab. In the default UI configuration, the tab’s title is italicized if the pane item is pending. If you want the tab to stick around permanently, simply double-click the file or the tab; in addition, when you edit text within a text editor that lives in a pending tab, the tab is automagically made permanent for you. You can disable this functionality by unchecking Allow Pending Pane Items in the Core Settings section of the editor settings.

Atom editor - Major Changes in 1.6.0 Stable - Pending Pane Items