How do I get files with no extension to open with Sublime Text 2 by default?

3

1

Whenever I download programs or MediaWiki extensions there nearly always are README, INSTALL and COPYING files contained within the downloaded directory(s). These files usually have no file extension and hence the Open With... window has a blocked out

Always use the selected program to open this kind of file

box (hence one can't tick it to say yes to this option). Is there any way around this to get these types of files with no extension to automatically (i.e., by default) open with Sublime Text 2?

BH2017

Posted 2015-04-16T09:40:09.477

Reputation: 437

1I think this is not possible. I have Sublime Text 3, so when I right click on a file there is a context menu option Open with Sublime Text. – Devid – 2015-04-16T09:51:13.423

I'd be interested to see how this is done for ANY program. – Panomosh – 2015-04-16T10:00:42.340

Answers

3

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.]

[HKEY_CLASSES_ROOT\.\shell]

[HKEY_CLASSES_ROOT\.\shell\open]
@="Open &with Sublime Text"

[HKEY_CLASSES_ROOT\.\shell\open\command]
@="C:\\Program Files\\Sublime Text\\Sublime.exe \"%1\""

Modify the path to the Sublime Text executable as required, save as a .REG file and double-click to import into the registry.

Karan

Posted 2015-04-16T09:40:09.477

Reputation: 51 857

0

Go to registry editor and add extension . (only dot, nothing else, check .txt as reference example) to the extension rules. Check any other relevant extension to see the correct name tags for the open fields. You can even add the entry OpenWithList and add multiple handlers there.

Practically, it should look something like:

[HKEY_CURRENT_USER\Software\Classes\no.ext\shell\open\command]
@="c:\pathtoapp.exe \"%1\""
[HKEY_CURRENT_USER\Software\Classes\.]
@="no.ext"

Overmind

Posted 2015-04-16T09:40:09.477

Reputation: 8 562

Where in the registry editor is this? I checked HKEY_CURRENT_USER\Software\Classes\no.ext but that doesn't exist (down to classes does, however). – BH2017 – 2015-04-16T11:32:44.977

It's an example. You can use anything instead of no.ext - you must create that. The classes. must be ' . '. – Overmind – 2015-04-17T04:58:29.017

-1

Go to Folder Options > view and uncheck "Hide Extension for known file types". No you should be able to see the file Extension now you can Download and install a Texteditor like Notepad++ inside the notepadd++ Options you can set to notepad++ open files with Extension xy to Default.

veritaS

Posted 2015-04-16T09:40:09.477

Reputation: 321

1No, this is wrong. The actual file name is README, or INSTALL, or whatever. There is no extension, that's the whole point of the question. – MattDMo – 2015-04-16T17:07:59.677