2

I am running on Ubuntu 14.04 and when I right click on a file and do Open With >> Other Application and click on Show All Applications, Sublime Text 2 does not appear. When I installed it originally I ran this command:

sudo sublime /usr/share/applications/defaults.list

and I changed all occurrences of gedit.desktop to sublime.desktop. However, it still opens everything with gedit by default. How can I get Sublime Text 2 to show up when right clicking and choosing Open With? And why is gedit still default? Thanks for reading.

timo.rieber
  • 3,727
  • 3
  • 32
  • 47
milkyway
  • 23
  • 1
  • 8

1 Answers1

0

Here what you can achieve:

enter image description here

NOTE: This is for Windows users, not sure if it will work on other operating systems.

Open regedit.exe

FOR FOLDERS

Navigate to this key using the tree on the right: HKEY_CLASSES_ROOT\Directory\shell\

Create a new key in the shell key with any name like: Sublime or Open with Sublime Text or Sublime Text

There will be a key with a Name: (Default) and enter the Data: Open as Sublime Project

Create a new Binary Value with Name: Icon and enter the Data: C:\Program Files\Sublime Text 3\sublime_text.exe (Make sure you change the version of the Sublime Text you are using)

Create a new key in the key name (Sublime or Open with Sublime Text or Sublime Text) with Name: command

There will be a key (in that command key) with a Name: (Default) and enter the (Choose any one of the option below)

  1. Data: C:\Program Files\Sublime Text 3\sublime_text.exe -n "%1" (If you want to open the project in new sublime window)
  2. Data: C:\Program Files\Sublime Text 3\sublime_text.exe "%1" (If you want to open the project in sublime window, which is already running or you are currently using)

FOR FILES

Navigate to this key using the tree on the right: HKEY_CLASSES_ROOT\*\shell\

Create a new key in the shell key with any name like: Sublime or Open with Sublime Text or Sublime Text

There will be a key with a Name: (Default) and enter the Data: Open with Sublime

Create a new Binary Value with Name: Icon and enter the Data: C:\Program Files\Sublime Text 3\sublime_text.exe (Make sure you change the version of the Sublime Text you are using)

Create a new key in the key name (Sublime or Open with Sublime Text or Sublime Text) with Name: command

There will be a key (in that command key) with a Name: (Default) and enter the (Choose any one of the option below)

  1. Data: C:\Program Files\Sublime Text 3\sublime_text.exe -n "%1" (If you want to open the file in new sublime window)
  2. Data: C:\Program Files\Sublime Text 3\sublime_text.exe "%1" (If you want to open the file in sublime window, which is already running or you are currently using)
Yashu Mittal
  • 1,478
  • 3
  • 14
  • 32