Hi All,
This is my first post as well as my first Sublime plugin, so please be gentle
This plugin is pretty straightforward - it sets a file’s syntax based on a shebang line during file load and save (i.e. ‘#!/usr/bin/env python’ to Python). From what I’ve seen, this already exists in the core, but not to the extent that it handles ‘env’ as the binary, with the actual binary (such as ‘python’) as an argument to env.
Essentially, the plugin capitalises the first character of the binary it finds and matches that against syntax directories and files in the Packages directory. In some cases, this won’t work (‘PHP’ is all upper-case, Bash is ‘ShellScript/Shell-Unix-Generic.tmLanguage’) - when this is the case, simply add those to the plugin settings file. This also works if you have additional binaries that need to use the same syntax - an example being ‘python2’ and ‘python3’ needing to use the Python syntax.
More info can be found here - I’m currently waiting for the plugin to be added to Will Bond’s Package Control.
Any issues, please raise them on GitHub