Sublime Forum

Select multiple files in MacOS Finder and open in Sublime as separate windows

#1

I’m trying to open multiple files as separate windows but haven’t found a way. Here are the steps taken:

  • In preferences.sublime-settings there is this entry: “open_files_in_new_window”: true,
  • Selected multiple files in Finder where the default application is “Sublime”
  • Opened using control + o
  • A new window opens containing all selected files as tabs.

Is there a way to change settings to have selected files open as separate windows?

0 Likes

#2

Me Three :-)-O

I work mainly from the command line and this would be a very nice feature to have.

0 Likes

#3

Possibly this doesn’t work for you because of what you set the setting to:

	// When files are opened from a file explorer or from the command line, this
	// controls whether a new window is created or not.
	// - "never": Never open a new window unless no window is open.
	// - "always": Always open files in a new window.
	// - "finder_only": (macOS only) Only open files in a new window when
	//                  opening them from finder or dragging onto the dock icon.
	//
	// On Mac, this value is overridden in the platform specific settings.
	"open_files_in_new_window": "never",

In order to do what it sounds like you want, the setting should be set to "always" and not true.

Note also that if you have this setting turned on, you may want to turn this one on as well:

	// Set to true to close windows as soon as the last file is closed, unless
	// there's a folder open within the window.
	// On Mac, this value is overridden in the platform specific settings, so
	// you'll need to place this line in your user settings to override it.
	"close_windows_when_empty": false,

The defaults for Windows and Linux (as outlined above) are to never open files in new windows and never close windows when you close the last file, while on MacOS the defaults are to use "finder_only" and true respectively.

Presumably if you want all files to open in their own window you also want the window to close when you close the file, or you may end up with a ton of empty Sublime windows.

1 Like