risa_risa
risa_risa

Reputation: 777

How to open new project in a new tab in Atom?

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

Upvotes: 4

Views: 5208

Answers (2)

risa_risa
risa_risa

Reputation: 777

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',

Upvotes: 6

J. Willette
J. Willette

Reputation: 2175

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

Upvotes: 12

Related Questions