Sublime Forum

A bit mystified by Sublime

#1

Hi all,

I’ve been a long user of Windows text editors like NoteTab and Notepad++. When I got a Mac with a new job about 18 months ago, I asked for recommendations for a text editor and was steered to Sublime Text 2. I installed it and started using it happily from day one, and it behaved more or less in an understandable way. I’d open a file (Command + O to open a Finder-like window), find the desired file in the tree, and open it; do the same for another in some other directory, and I’d get a new tab in the same window, etc.

Then one day I fat-fingered something – probably while trying to copy or paste something – and the default behavior of Sublime regarding opening files changed. Suddenly, when I navigated to open a file, and I clicked on a folder to expand it, a new Sublime window launched, with a sidebar showing the folder and its contents. From here on, any time I tried to open files in the way I was used to, when I went to a different directory, I’d get a fresh instance of Sublime. I could no longer seem to just have a single instance of Sublime with all my open files displayed as tabs in that same window regardless of which directory they were in.

I struggled through for a while like this, figuring I’d get used to it sooner or later, but after a time it just continued to feel alien to me and hampered my workflow. So I spent a bit of time trying to find out how to go back to the way it had behaved out of the box. I recall having a really hard time finding how to do this, but eventually I stumbled on something that worked. This was probably about a year ago. Life was good again.

Until yesterday, when once again I seem to have inadvertently toggled this other “mode” again. Naturally I didn’t save any notes about what I had done to revert it last time, and once again I seem to find it impossible to craft a search phrase that googles me any useful information. So I decided to come here and post this.

I see that there’s a Preferences setting that’s called open_files_in_new_window (which sounds pretty much like what’s happening to me), but this is set to false. I thought it might have something to do with Projects but I’ve never defined one.

Can anyone steer me to what I need to do here?

Thanks much!

0 Likes

Requesting tips for a few new user woes: new windows, macros, bookmarks
#2

From the support page sublimetext.com/docs/3/ and under ‘Miscellaneous’ on both pages there is a link about reverting to a freshly installed state.

0 Likes

#3

subhaze,

According to that, reverting to a freshly installed state will also undo any other settings I might have made and any packages I have. I don’t want to be that extreme.

0 Likes

#4

Does this happen just when doing ‘control-o’, or even when selecting ‘Open File…’ from the file menu?

0 Likes

#5

RyanJ,

Yeah, either way, and also if I am in the Mac Finder, highlight it, and select Open With… from the context menu.

0 Likes

#6

Preferences - Settings - Default

This could be what you’re looking for:

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

// OS X only: This controls if an empty window is created at startup or not.
"create_window_at_startup": true,

// Set to true to close windows as soon as the last file is closed, unless
// there's a folder open within the window. This is always enabled on OS X,
// changing it here won't modify the behavior.
"close_windows_when_empty": false,

There’s a bunch of other interesting setting variables in there… so be sure to check them out.

0 Likes

#7
"open_files_in_new_window": true,

is what’s in my Preferences file. I even tried toggling it to false and back; no change in behavior.

0 Likes