+13

Opening a folder from the command line should focus on the existing window if that folder is already open in Sublime.

Tim Haines 12 років тому оновлено Brian Jacobs 3 роки тому 4
Opening a folder from the command line should focus on the existing window if that folder is already open in Sublime.
I have posted a similar request for opening files from the cli when said file is already open in a Sublime window.  See:


That issue contains a workaround script for Linux that will re-focus the Window (via wmctrl) rather than calling Sublime if the window is already open.  Said script does not attempt to solve the folder-view focus issue reported here; it would be possible to attempt such a workaround, although it is not possible to distinguish between multiple different folders (in different locations) with the same name by this method.
The same should happen when opening a project:
subl --project x

If project x is already open, it should just activate this window.

Is there a way to do this in 2020? e.g. `subl .` opens a window. running `subl .` again in the same directory focuses the same window rather than opening a new one.

edit: i'm on MacOS