Home Download Buy Blog Forum Support

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

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

Postby jpulakka on Mon Oct 18, 2010 10:14 am

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
jpulakka
 
Posts: 4
Joined: Mon Oct 18, 2010 10:05 am

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

Postby jps on Mon Oct 18, 2010 11:09 pm

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.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

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

Postby jpulakka on Fri Oct 22, 2010 12:58 pm

jps wrote: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.


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 :)

Best Regards,
Joonas
jpulakka
 
Posts: 4
Joined: Mon Oct 18, 2010 10:05 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 18 guests