I am on Mac Os Sierra, running Sublime Text build 3126. A number of file extensions work correctly, i.e. right-click on a .java file or .json file and I see Sublime Text in the open with dialog. However if I do the same with a file ending in .log, Sublime Text doesn’t appear and I have to select Other and locate Sublime Text from items in the applications folder.
I have fixed this on my machine but it may not survive an update and maybe there is a “Sublime Text” way of accomplishing this. Here is what I did.
I went to the Sublime Text.app, did show package. Then I went into Contents and edited info.plist, and yes I had backups
I changed the following adding the log extension:
CFBundleTypeRole
Editor
CFBundleTypeName
Plain Text
CFBundleTypeExtensions
txt
log</string
CFBundleTypeIconFile
TEXT
Then I did lsregister -f /Applications/Sublime\ Text.app
so that it would re-read the info.plist and add the log extension and I can now right click on a .log file and have it opened from the menu without the extra work of having to look through the Applications.
Sorry about the length, so is there another way that is more lasting or is it possible that this extension could be added to the info.plist file as a default?
Thanks for you time in advance.
Dennis