Last active
April 1, 2022 05:18
-
-
Save wishfoundry/7036457 to your computer and use it in GitHub Desktop.
Set OSX default text editor to sublime text 3 instead of TextEdit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}' |
@rosedomini: cat "/Applications/Sublime Text.app/Contents/Info.plist"
and look at the value of CFBundleIdentifier
can I extend to specific extension file type, such as *.log, *.cfg etc ?
thanks.
Im getting this error on macOS Sierra
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
2017-08-26 19:58:45.582 defaults[24068:864501] Value for key LSHandlers is not an array; cannot append. Leaving defaults unchanged.
Does anyone have any insight?
Im getting this error on macOS Sierra
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}' 2017-08-26 19:58:45.582 defaults[24068:864501] Value for key LSHandlers is not an array; cannot append. Leaving defaults unchanged.
Does anyone have any insight?
Hello!
I have the same problem. How did you solve it?
Restart Finder after the above command via: COMMAND + ALT + ESC, scroll down the list and select "Finder" and press "Relaunch".
Works fine here with MacOS Catalina Version 10.15.4 (19E266).
No errors, but no changes either on Catalina 10.15.6.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! May I ask how did you find that "com.sublimetext.3" is the package name for the Sublime Text app? I tried googling for it but...