Skip to main content
added 2 characters in body
Source Link
anki
  • 11.9k
  • 7
  • 35
  • 71

I tried grg's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.

DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.

You can see the file/folders being modified in the following path:

/user/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

Screenshot for reference: [![enter image description here][1]][1]enter image description here

Here's the command I used in terminal:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

Lastly, after a restart to my machine it worked as advertised. [1]: https://i.sstatic.net/qQOQg.jpg

I tried grg's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.

DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.

You can see the file/folders being modified in the following path:

/user/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

Screenshot for reference: [![enter image description here][1]][1]

Here's the command I used in terminal:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

Lastly, after a restart to my machine it worked as advertised. [1]: https://i.sstatic.net/qQOQg.jpg

I tried grg's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.

DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.

You can see the file/folders being modified in the following path:

/user/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

Screenshot for reference: enter image description here

Here's the command I used in terminal:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

Lastly, after a restart to my machine it worked as advertised.

Had previously upvoted this answer for reference, but was having trouble finding the actual command. Bolded for emphasis.
Source Link

I tried grgarsidegrg's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.

DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.

You can see the file/folders being modified in the following path:

/user/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

Screenshot for reference: [![enter image description here][1]][1]

Here's the command I used in terminal:Here's the command I used in terminal:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

Lastly, after a restart to my machine it worked as advertised. [1]: https://i.sstatic.net/qQOQg.jpg

I tried grgarside's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.

DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.

You can see the file/folders being modified in the following path:

/user/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

Screenshot for reference: [![enter image description here][1]][1]

Here's the command I used in terminal:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

Lastly, after a restart to my machine it worked as advertised. [1]: https://i.sstatic.net/qQOQg.jpg

I tried grg's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.

DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.

You can see the file/folders being modified in the following path:

/user/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

Screenshot for reference: [![enter image description here][1]][1]

Here's the command I used in terminal:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

Lastly, after a restart to my machine it worked as advertised. [1]: https://i.sstatic.net/qQOQg.jpg

Source Link

I tried grgarside's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.

DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.

You can see the file/folders being modified in the following path:

/user/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist

Screenshot for reference: [![enter image description here][1]][1]

Here's the command I used in terminal:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

Lastly, after a restart to my machine it worked as advertised. [1]: https://i.sstatic.net/qQOQg.jpg