Sublime Forum

Command line vs untitled

#1

Hi,

If there’s no active ST window, if I run “subl .” on the command line (to open the current directory as an ST project), it also creates an empty “untitled” file. This is fairly annoying, and virtually never what I want (I want to start working on the files in the directory, not create new ones).

Is there a way to turn off this behaviour?

Martin

0 Likes

sublime_text --project XXX opens extra window
Subl opens extra empty window
Dev Build 2141
#2

+1. Ecstatically, +1.

0 Likes

#3

agree. this is confusing and uncommon at least for a new user from other editors.

0 Likes

#4

The same thing happens here (on Build 2139/Mac OS X Lion).

I have open_files_in_new_window set to false.

And +1 to a way to turn this off, I agree. I often run multiple subl commands to open up windows with a few libraries and my project (I prefer to keep them separate) so I end up with multiple Untitled windows to go with them.

0 Likes

#5

I am not sure why the . is required on the command line. Is that a typical way to open the cwd in the editor?

0 Likes

#6

“subl .” no longer creates an untitled tab in 2139

0 Likes

#7

As per my post above, it does for me on 2139 on Lion.

Happy to record a screencast or send you any debug logs (if they are created by Sublime Text 2) if you want :wink:

0 Likes

#8

BUMP

0 Likes

#9

[quote=“andyjeffries”]

As per my post above, it does for me on 2139 on Lion.

Happy to record a screencast or send you any debug logs (if they are created by Sublime Text 2) if you want :wink:[/quote]

+1

“subl .” always creates an untitled windows on Lion 10.7.2

0 Likes

#10

This also happens to me in build 2141 on OS X 10.7.2

0 Likes

#11

Mine opens an extra window too. I’m using windows and sublime 2 build 2221

0 Likes

#12

Am I the only one seeing this with later versions of Sublime?

“subl .” in my project dir worked as expected with Sublime 3

On build 4116 (and I think a couple of previous version 4 builds) it opens the “untitled” window as well. I’m on Mac Mojave 10.14.6

Is there an effort to fix this annoying issue? Or a work around?

0 Likes

#13

yep.

0 Likes

#14

Thank you!

0 Likes

#15

The change log for build 4117 seems to indicate that this issue has been fixed?

I still see the issue after the update. Sublime Build 4117, Mac OS Mojave 10.14.6

0 Likes

#16

It’s been fixed in 4117. I can’t reproduce it there anymore. Perhaps you’re seeing the previously open windows being restored? That would be a feature you can disable using the "hot_exit" setting.

0 Likes

#17

Hi Ben, I have both “hot_exit” and “remember_open_files” set as false in my settings. I still see it.

0 Likes

#18

Can you share the exact steps for reproducing that? (ie. is ST running, how are you starting it, etc.)

0 Likes

#19

This is what I observe w.r.t this behavior.

When Sublime is not running, and I hit “subl .” I get two windows like I have shown above.

Now, if I close both windows but keep Sublime running and run the same command from the same folder, I get just the one window that I expect.

I can keep ST running and avoid this behavior but I’m used to “quitting” ST on my Mac when I don’t need it and then launching it again when needed. I’m pretty positive that I never saw this behavior with ST3.

0 Likes

#20

Can you confirm that you’re running 4117/4118 using the menu Sublime Text > About

0 Likes