Hi,
TL;DR: steps to reproduce the bug on Windows
-
start ST4 from an admin software (example: from
cmd.exe
which has been started as admin): it shows (ADMIN) in the ST title bar -
double-click on
test.txt
on Desktop : it opens a new ST window (non admin) -
double-click on
test2.txt
on Desktop : it opens a third ST window (non admin)
…
- double-click on
test9.txt
on Desktop : it opens a 10th ST window (non admin)
How to have only 1 or 2 windows, and new tabs instead?
Note: if you reproduce these steps avoiding step #1 (starting an (ADMIN) ST window first), then at the end of step #10, you have only one single window, with many tabs, as expected.
QUESTION:
In my setup, files are opened in ST4 from various places:
- from the Windows File Explorer, for example double clicking on a
.txt
file on Desktop (then ST is NOT started as admin) (.txt file are associated with Sublime) - from “Everything” (which in my setup runs as admin), then ST opens a new window “ADMIN” to open the files
- from Autohotkey (it HAS to run as admin, if not => it wouldn’t catch keyboard shorcuts when you are using an admin software / when an admin software has “focus”), then ST opens a new window “ADMIN”.
So logically, at the end, there should be maximum 2 ST windows:
- 1 non-admin ST window
- 1 admin ST window
But for an unknown reason, every time I double click on a new .txt
file (either in Explorer or Everything or elsewhere), sometimes it opens a new window instead of a new tab.
At the end, I end up with 5 or 10 different ST windows, with the same files opened! It’s totally unusable, you don’t know which window has the “latest” version of a file.
I already use "open_files_in_new_window": false
but without success.
Questions:
-
how to avoid having more than 2 ST windows (one for admin, and one for non-admin) when you open new files from Explorer (with filetype association)?
-
is it possible to have only 1 window (either admin or non-admin), and then each time you open a new file (from anywhere, from a non-admin like Explorer or admin software like Everything), it adds a new tab in the single ST window, and not open a new n+1 window?
I am searching for this since days, without success. I have already looked at this, without success:
Opening New Window instead of New Tab - Technical Support - Sublime Forum
Open files in new window (for Windows) - Ideas and Feature Requests - Sublime Forum
Too many windows opening on Mac when using Unity. How to stop it - Technical Support - Sublime Forum
Thanks