Sublime Forum

Can't open second project window with subl -- expected?

#1

This may just be the nature of the way subl is implemented, but I’ve noticed this behavior that is different than what I’d expect. Steps:

  • in terminal, cd /dev/project1
  • subl .
    • new Sublime window opens with the /dev/project1 directory in the sidebar
  • back in terminal, cd ../project2
  • subl .
    • expected: second Sublime window opens with the /dev/project2 directory in the sidebar
    • actual: focus switches to the first Sublime window with project1 still in the sidebar, no second window opens

This seems like a huge oversight; don’t we all have multiple projects open a lot of the time?

Mac OS X 10.11.6
Sublime Text Stable Build 3126

0 Likes

#2

I don’t often use Sublime in this manner from the command line, but I believe you need to invoke it with an option of -n to tell it to open a new windowm as by default it tries to operate over the existing window instead.

1 Like

#3

The -n argument does not seem to change the behavior, i.e. it still won’t work.

0 Likes

#4

On Windows, I get your expected behavior.

Did you override …

// OS X only: When files are opened from finder, or by dragging onto the
// dock icon, this controls if a new window is created or not.
"open_files_in_new_window": true,

by any chance?

0 Likes

#5

I was just going to say that I just tried this on my Mac and it seems to work just fine even without the command line argument, so the problem seems more likely to be an issue with configuration somehow. I would check into the config option @dubeg mentioned.

0 Likes

#6

@dubeg @OdatNurd nope, haven’t overridden that pref, and I just double checked. Stuck at this point.

0 Likes

#7

Hm. Maybe you could download the portable version and check if that version does it too (so we’d know if it’s sublime’s fault or something else somewhere that causes problem).

0 Likes