3

Currently, when I double-click on a file in Finder, it opens a new Sublime Text window, when I already have a Sublime Text window open. This results in me having to drag the tab in the new window to the existing window. If I use the File-->Open menu in Sublime Text, it, of course, opens in the same window.

I would like the default behavior, when opening a file in Finder, to open the file in the existing Sublime Text window. I scoured through the settings/preferences in Sublime Text, but I couldn't find anything related to what I want.

Is this behavior even possible? If so, how do I modify the preferences to achieve it?

4

There's a macOS-only setting which does exactly that (taken from Preferences.sublime-settings):

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

When using the command-line, you can use the -a switch to append to an existing window:

subl -a index.html

The same switch could be used on Windows by modifying the default open action in the registry.

  • You are a lifesaver. Thanks for your answer! – Chris Cirefice Nov 29 '17 at 18:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.