4

I often have several virtual desktops open in Windows 10 with various programs in each one. I often want to open in my current virtual desktop a new instance of a program that already has a window open in another virtual desktop.

Most programs, like Chrome and Microsoft Word, always open a new window on the current desktop when I start them, even if there's already another window of that program on another desktop. However, attempting to start Sublime Text will cause Windows to switch to the virtual desktop in which the program is already running*, instead of opening a new window on my current one. This behavior occurs with Sublime Text 2 and 3.

Is there any way to force Sublime Text to always open a new window even if it's already running somewhere?

(*The issue isn't specifically to do with multiple desktops -- it can also be demonstrated on a single desktop. When most programs open a new window on starting even if they're already running on that desktop, Sublime Text will bring one of its existing windows into focus.)

2

This SU question tells me that this behavior is caused by Sublime Text intentionally preventing new instances of itself from starting. (My issue isn't quite the same but seems to be caused by the same Sublime Text "feature" that led to that problem.) An answer there provides a hacky workaround that I'm somewhat uncomfortable using since I assume Sublime must have some reason for doing this. I'm doubtful that there's a better solution, since this seems very intentional and Sublime doesn't seem to provide an option to change that behavior. But I'd love to hear if anyone knows of one.

The simple solution as pointed out by r-stein in the comments to this answer is just to use the command line argument -n. You can manually edit Sublime's Start menu shortcut to include this.

  • A new instance is different to a new window. I am not familar with win10, but pressing windows+r should popup an execute window. If you paste in that window C:\Program Files\Sublime Text 3\subl.exe -n (obviously with your path to ST) it should open a new ST window. From that command one could create something like nicer opening menu item. – r-stein Mar 29 '16 at 20:21
  • 1
    Ah, the -n argument was exactly what I was looking for, thanks! – erobertc Mar 29 '16 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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