Sublime Forum

Using Sublime Text as the "default program" to open .txts

#1

In Windows Explorer, I tried to associate .txt files with Sublime using right click the file -> Open with -> Choose default program -> from there choosed sublimetext.exe. It works, but opening files this way takes about 10 seconds even if Sublime Text is already running. Opening files from Sublime’s own File->Open menu is snappy and fast.

Obviously there’s something wrong with the way I’m associating the files; maybe it tries to start another instance of Sublime (which obviously takes time), and then at some later point it notices that there’s already one instance running, and then opens the file with it. Is there any way to speed up this process?

Otherwise, what a magnificent editor!

Best Regards,
Joonas

0 Likes

#2

Does the ‘Open in Sublime Text’ context menu entry take this long too?

FWIW, setting up Sublime Text as the default program for .txt files doesn’t have any delay for me.

Whenever a file is associated with an application in Windows, a new instance of that application is always created by explorer when you double click on a file, and its then up to that program to hand off the files to the existing instance and then exit.

There are two possible scenarios I can think of that would cause a delay:

  • For some reason starting the new instance is taking a long time. A virus scanner can cause issues like this.
  • There is an unresponsive application running that’s causing the search for the existing instance to take a long time. Try closing other applications and see if the issue persists.
0 Likes

#3

[quote=“jps”]Does the ‘Open in Sublime Text’ context menu entry take this long too?

FWIW, setting up Sublime Text as the default program for .txt files doesn’t have any delay for me.

Whenever a file is associated with an application in Windows, a new instance of that application is always created by explorer when you double click on a file, and its then up to that program to hand off the files to the existing instance and then exit.

There are two possible scenarios I can think of that would cause a delay:

  • For some reason starting the new instance is taking a long time. A virus scanner can cause issues like this.
  • There is an unresponsive application running that’s causing the search for the existing instance to take a long time. Try closing other applications and see if the issue persists.[/quote]

Found the culprit, it was Sophos Anti-Virus “on-access scanning” feature. Adding “C:\Program Files (x86)\Sublime Text” to its “Exclusions” list made Sublime super fast :smile:

Best Regards,
Joonas

0 Likes