How to always open files in new Window


#1

Hi!

I already tried to find this but without success.
I want to open different files in separated windows. Currently, when I open the 2nd file, one more TAB is created in the same Atom window.

Is there a way to change this? How?

Thank you!


#2

I don’t know whether or not there is a way to open a new window automatically. However, you can right-click on a file tab and select Open in New Window.


#3

@Bruni: When you normally open a file, how do you open it? From where (menu / tree) do you open the file? Do you want a new window or a new (adjacent) pane inside the same window?

@DamnedScholar: Is the an API command available to open a file in a new window?


#4

Given @Bruni’s description of the problem, it would have to be a command line switch, such as atom --new-window that could be turned into a context menu item for the file manager.


#5

When I try to open a .txt file for example (using atom as the default .txt editor).
If I have 2 .txt files and I want to open both - I open the fist and when I open the second, it opens in the same Atom window… I just want to open the second file in a separated atom window.


#6

How can I use this “atom --new-window” ?


#7

You can’t, because it doesn’t exist, like I said.


#8

Just FYI, I tried opening files programmatically in the command line, but it still doesn’t work. See below

$  atom file1; atom -n; atom file2

What it does is:

  1. Open file1 in a window.
  2. Open a second window.
  3. Open file2 in the first window.

The first few lines returned by atom --help say:

[...] If there is an existing Atom window that contains all of the
 given folders, the paths will be opened in that window. [...]

So I think the approach to this problem would be to see what part of atom’s code says, “hey, if this new file is in the same folder as the old file, open it the old file’s window.” That is, there’s probably some checking mechanism.


#9

It might be fair to other if we link to your other post as you have made progress ->