4

I'm on a Mac (MBP) and previously, I had set my Finder preferences to open any app in a new tab (open folders in tabs instead of a new window). It got Atom Editor to open new/diff projects in a tab vs a new window.

My normal workflow might be something like this in iTerm: atom . then atom ../proj

This was working up until today. I've even restarted my Mac to see if it would persist or was some weird buggery. No such luck. Any folder I open w/ Atom from iTerm now opens as a new window. How do I get it back to opening it w/ tabs again?

I liked having other projects being opened and being tab-separated in Atom. (And I liked being able to pull them off into their own separate window.)

TIA

Pavel_K
  • 10,748
  • 13
  • 73
  • 186
risa_risa
  • 727
  • 1
  • 8
  • 20

2 Answers2

12

Update:

Try this: In OSX, go to System Preferences -> Dock, and if the option is set to In full screen only trying changing it to Manually, or Always. Setting it to "Always" worked for me.

See https://github.com/atom/atom/issues/12690#issuecomment-246930784

Original answer

I think you currently have two options depending whether you want to add an entire folder (project) to the currently open atom window, or a just a single file.

If you want to open an entire new project in the same atom window, you can add it with:

atom -a ../new-project

It will then be visible in the sidebar and new files you open from it will open in new tabs.

If you want to open a single file in a new tab in the same window, you can use:

atom -n false ../new-project/single_file.txt
Community
  • 1
  • 1
J. Willette
  • 2,095
  • 1
  • 15
  • 14
  • Hm. `atom -a` adds it as a project on the left hand side. I mean open the project up in a new tab, like cmd-t on iTerm creates a new iTerm tab (e.g. this: [iterm screenshot](http://i.imgur.com/7ncrSln.png) ) It used to work in Atom, but this morning it stopped working. :( – risa_risa Aug 09 '17 at 20:38
  • Check the updated answer, hopefully it works for you – J. Willette Aug 10 '17 at 19:10
  • Hah, I had done that too, originally (and had emoji-reacted to that comment). So it's currently set to `Always`. I toggled that to be `full-screen only` just now, but weirdly, i get the 2nd project to pop up as a new window instead, so it seems like tabs in general are broken on Atom? (should i report it as a bug?) Finder responds as expected w/ a new tab instead of new window. – risa_risa Aug 10 '17 at 21:41
6

This was evidently a bug with Atom. What I was trying to do was open native tabs (a term I didn't know until today). I happened to come across this issue on their GH: https://github.com/atom/atom/issues/15202

It must have started back in 1.18.x, but has since carried over to the current version (1.19.1 / 1.19.2).

Quick and easy solution was provided by a user there. It is to:

1) open file /Applications/Atom.app/Contents/Resources/app/src/main-process/atom-window.js

2) to line 58, options variables, add tabbingIdentifier: 'atom', (with comma).
This is what mine looks like:

    options = {
    show: false,
    title: 'Atom',
    tabbingIdentifier: 'atom',
risa_risa
  • 727
  • 1
  • 8
  • 20
  • I've been trying to find a working solution for months now, this is what did it. Thanks! – zzk Sep 29 '21 at 13:25