Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime as default editor

Is there a way to set Sublime Text as the default text editor for file formats on Windows 7?

Also, if anyone knew a Sublime Text Tutorial or Wiki that would be really helpful.

like image 297
doque Avatar asked Feb 26 '12 05:02

doque


People also ask

How do I set Sublime as default text editor in Windows?

First go to the windows settings menu, click on the Apps settings. From there click Default Apps, scroll down until you see "choose default app by file type". Click that option, then scroll to the file extension ". txt", and click the gray plus arrow beside it and select sublime text.

How do I set Sublime Text as default text editor in Ubuntu?

One: Set up a sublime. desktop file in ~/. local/share/applications Sublime comes with this file in the same directory as the sublime_text executable (the sublime_text application directory), so you may need to change the first argument to match your file structure.


2 Answers

Actually it is not my answer, I have just googled it:

  1. Open regedit (Win+R, type "regedit", select OK).
  2. Navigate to HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command
  3. Verify that the path is accurate, correct it if it is not. Exit regedit.
  4. Open task manager via Ctrl+Alt+Del (or Ctrl+Shift+Esc for later versions of Windows), kill explorer.exe, go to run (Win+R) and type "explorer.exe" (or skip this step and simply reboot).
  5. Now attempt the same thing, right click a text file, open with, navigate to sublime, and it should now appear in the list of available applications.

For me that value pointed to the Desktop where portable version previously was placed. Thus it just didn't work.

P.S. And for me the reboot or logout were not necessary (WinXP).

like image 167
avp Avatar answered Oct 09 '22 08:10

avp


Edit on Nov 21, 2014

Tim Lewis pointed out in the comment that there is a more generic version at http://www.binaryfortress.com/NotepadReplacer/, which works better.

Original Answer

Try this: https://github.com/grumpydev/Sublime-Notepad-Replacement

like image 43
Jay Zhu Avatar answered Oct 09 '22 08:10

Jay Zhu