Sublime Forum

Setting to not open new window at startup

#1

Does anyone know what the setting is to turn off the option to open a new window at startup? I looked in Preferences -> Settings - Default, but not seeing it.

0 Likes

Command line parameter causes two windows to open
#2

So I assume this feature doesn’t exist?

0 Likes

#3

Sorry that no one has replied. This feature does not exist. Could I ask why you want something like this?

0 Likes

#4

Why I want it? Because I don’t want to open a new document when I start up Sublime. I usually open an existing file or a project folder instead.

0 Likes

#5

Probably you should add another post, just in case…

You can turn „remember last document” on and you won’t see a new document anymore…

0 Likes

#6

@_ado: Sublime will open a new window when started if -n or --new-window is included on the command line. Maybe you have that set somewhere. Look at the icon or shortcut you use to start Sublime and see if any parameters are specified.

As iamntz mentioned, this may also be affected by the settings remember_open_files, hot_exit, and open_files_in_new_window if on OSX.

0 Likes

#7

“hot_exit”: false,
“remember_open_files”: true,

will still have app create new window on launch if it was closed with no windows open.

0 Likes

#8

My settings:

"hot_exit": true,
"remember_open_files": true,

Those are just the defaults - I haven’t changed those. Here’s the testing I’ve done in Windows:

  1. Close Sublime with no documents open, open sublime, no new file created.
  2. Close Sublime with new file open (not saved to disk), open sublime, same new file exists, but no other tabs
  3. Close Sublime with file open (real file on disk), open sublime, same file opens but no other tabs
  4. Close Sublime with no documents open, open text file with Sublime using context menu, Sublime opens that file, no other tabs

Basically - no combination of opening and closing files gives me any unwanted tabs.

HOWEVER… there is a default blank slate that Sublime opens with. The text editor is there and available, but no tabs are created. If you start typing, then a tab is created. To me this is awesome. I don’t have to specifically create a new file. It’s ready for me to type - or not type. If I open a file, there’s no New document tab created or anything. Is that what you’re seeing?

0 Likes

#9

I need this preference too, as BBEdit !

When I click on the Sublime Text, or at startup, it shouldn’t open new blank window with the appropriate preference (for example “open_blank_window”)

Thanks !
Nicolas

0 Likes

#10

The new setting “create_window_at_startup” seems to work well !

Now, it would be nice to create a new setting that permits to not open blank window when we click on the software’s icon in the dock :smile:

Thanks !

1 Like

#11

I think it would be nice to have the state scoped to the project. So that if I type:

subl project1 

I get project1 plus any extra documents or unsaved files that were opened while I was working on project1. I know it cold get tricky deciding what open documents should be associated with what project, but from a usability point of view it would be ideal. What I don’t want is to open suplime on project2 and get all of project1 and a bunch of other documents open. I also don’t want to manually close all those project1 documents because next time I want to work on project1 I would like them all to be there - including unsaved files.

0 Likes

#12

I would love to see this added for re-activation so when I click the dock icon and no files are open, I don’t get a blank document. Textmate had this and I relied on it. Please help! :smile:

0 Likes