Sublime Forum

Problem with Sublime 4, running subl.exe creates new win

#1

Hi,
I’m a long time Sublime 3 used and recently I upgraded to version 4.
I have Windows 10.
I’m using some hotkey to fast run subl.exe with special text files.
In version 3 all files was open as new tabs within current instance of sublime, but after upgrading it creates a new instance, reopen all tabs + new file in a separate instance - this is very very bad for me.
How to disable it? How to make subl.exe force run in current existing instance of sublime 4 AS A NEW TAB (not new windows/instance!!)?

adding to user settings:
“open_files_in_new_window”: false,
OR
“open_files_in_new_window”: “never”,

both doesn’t help!
anyway my hotkey trigger a totally new instance to run instead of just open a new tab!!
please help!!

0 Likes

#2

Is it opening a new application instance or just opening a new window? Do you see any errors logged in the Sublime Text console?

0 Likes

#3

Thnx for reply.
Looks like a New application window. Completely new application window with COPY of all tabs from prev window.
This is very appoining.
In sublime text 3 I had no such error - always subl.exe open a new tab within already running sublime application window.
How to force subl.exe to ALWAYS create a new Tab, not new application window when I run it with param to open a new file?

using ctrl-` i can see no errors in both application windows.
please help me force to run as a new tab as it was in sublime 3.
i paid money for upgrade to version 4 and now i have it worse!

0 Likes

#4

Can you paste the first couple lines from the console output of both application instances?

0 Likes

#5

OMG GUYS! you are so funny!
I FOUND A BUG!
in WINDOWS you treat DRIVE letter differently based on CASE of drive letter.
in windows case does NOT matter for files and folders!!!

console#1
executable: /e/text/sublime/sublime_text.exe

console#2
executable: /E/text/sublime/sublime_text.exe

when i changed drive letter BOTH to upcase - problem disappear

0 Likes

#6

Can you provide steps for reproducing that? I’m not able to get it to launch with the wrong capitalization.

0 Likes

#7

just make an app that run a subl.exe providing different path for running
in one case starting with DRIVE letter
in another case starting with driver letter
try make a .bat file for windows to run just with different FULL subl.exe pathes.

0 Likes

#8

I’m unable to reproduce with either a batch or python script:

"C:\Program Files\Sublime Text\subl.exe"
"c:\Program Files\Sublime Text\subl.exe"
import subprocess

subprocess.Popen(["C:\\Program Files\\Sublime Text\\subl.exe"])
subprocess.Popen(["c:\\Program Files\\Sublime Text\\subl.exe"])
0 Likes

#9

I did re-produce a bug using 3 test .bat files:

test1.bat
start e:/text/sublime/sublime_text.exe test1.c

test2.bat
start e:/text/sublime/sublime_text.exe test2.c

test3.bat
start E:/text/sublime/sublime_text.exe test3.c

run test1 - open sublime
run test2 - open test2.c in new TAB
run test3 - open NEW APPLICATION WINDOW with copy of tabs

(maybe this help - drive E is made using “subst”)

0 Likes

#10

Thanks I’ve found the problem.

0 Likes