Created
January 21, 2019 20:03
-
-
Save Baptouuuu/7d6211904e97faf18c6c2c024069c7f1 to your computer and use it in GitHub Desktop.
Sublime Handler.app
This file contains hidden or 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
| <key>CFBundleURLTypes</key> | |
| <array> | |
| <dict> | |
| <key>CFBundleURLName</key> | |
| <string>SysPref Handler</string> | |
| <key>CFBundleURLSchemes</key> | |
| <array> | |
| <string>sublime</string> | |
| </array> | |
| </dict> | |
| </array> |
This file contains hidden or 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
| on open location this_URL | |
| -- passed urls should be "sublime://[file] | |
| -- @see https://yourmacguy.wordpress.com/2013/07/17/make-your-own-url-handler/ | |
| set x to the offset of ":" in this_URL | |
| set file_URL to text from (x + 3) to -1 of this_URL | |
| set cmd to "open -a 'Sublime Text' " & file_URL | |
| do shell script cmd | |
| end open location |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment