Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atom randomly opening files in the same (or different) tab

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

like image 515
Alberto Miedes Garcés Avatar asked Mar 23 '16 18:03

Alberto Miedes Garcés


People also ask

How do I open multiple files in an atom?

In your terminal you can type atom -a <filename||folder> and the file(s) will open within the same atom window. Show activity on this post. Go to Settings > Packages, look for the tabs package. In the settings for this package, choose "use preview Tabs".

How do I open an Atom file?

Right-click an item in the tree view (or open the context menu on an item in the tree view) and select Open File to open the currently open file in its default application.


3 Answers

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.

like image 190
Alberto Miedes Garcés Avatar answered Oct 02 '22 13:10

Alberto Miedes Garcés


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

like image 34
Abhishek Gupta Avatar answered Oct 02 '22 13:10

Abhishek Gupta


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

like image 31
kenorb Avatar answered Oct 02 '22 14:10

kenorb