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.

I definitely don't want this to come across the wrong way, but did you give DetectSyntax [1] a try before writing your own plugin? Identifying syntax by a shebang was one of the things I wanted to accomplish with DetectSyntax, and if you tried it and it doesn't work for you, I'd like the chance to fix it.

On the other hand, if you just wanted to write your own plugin, that's great! The more people writing quality plugins the better! So please don't take this the wrong way.

If something is going wrong with Phillip package you better try to fix it by communicating, there is no gain into having two packages doing "the same". Confuse people and is a waste of valuable resources and time.

tito wrote:If something is going wrong with Phillip package you better try to fix it by communicating, there is no gain into having two packages doing "the same". Confuse people and is a waste of valuable resources and time.

+1000There are more and more package in Package Control that do almost the same things.

The point is to try to unite efforts to get the problems solved. Not 123234 ways to resolve it. This community seems to not understand that.If your package is not doing nothing that DetectSyntax can't do, then why you submitted the package to package control?

vxnick wrote:I've looked and can't find anything similar other than DetectSyntax. I've already given my reasons why I finished developing this plugin (I hadn't found DetectSyntax at the time).

Nobody prevent you to write your plugins and use them, the problem is when you want to publish them on Package Control.

The Package Control repository grow very quickly, and having dozen of plugins with almost the same functionality is bad for both new and confirmed users.Searching and testing plugins is time consuming...

Github make collaborative coding simpler than it ever was, it's a pity that people don't use it more often.

I use a bunch of plugins from Package Control and a dozen of my own plugins.When I think something missing on a plugin from Package Control, I write an issue on github or send a pull request.If you think that something missing on the DetectSyntax plugin, as already asked by phillip.koebbe write an issue or make a pull request.

The reasons why you wrote your plugin and ask to publish it on Package Control is perfectly fine, but now you know that DetectSyntax exist, do you still think that your plugin must be published ?

Sorry, those plugins don't look related at all to mine or DetectSyntax unless I'm missing something.

Either way, people don't have to use my plugin - I developed it as a fun sideline and it does just one thing pretty well. I think it's fair to say that some people don't know regex and don't want to have to learn it in order to detect a file's syntax based upon a shebang line. For others, like us, it's not a problem adding that to DetectSyntax's settings.

To answer your question though - I feel my plugin meets the needs of end-users who aren't necessarily proficient enough (or can't be bothered) to write the regex for detecting this as part of DetectSyntax. Phillip's plugin is clearly better than mine, but I think they serve different purposes. If I was emulating pretty much everything that DetectSyntax was, then I'd agree with you

Anyway, if Will Bond decides that my plugin isn't suitable for Package Control then that's fine - if nobody uses it other than me, that's fine too. I just wanted the opportunity to let other people know it existed in case they were looking for something simple.

P.S. I expect this plugin to be a stop-gap solution anyway, until Sublime properly interprets shebang lines.

Sorry maybe I wasn't clear (or maybe my poor english), these examples was not related to your package, but to illustrate the point that there is already kind of duplicate packages in Package Control.And I'm not saying there is something wrong with any of these packages.

vxnick wrote:I feel my plugin meets the needs of end-users who aren't necessarily proficient enough (or can't be bothered) to write the regex for detecting this as part of DetectSyntax. Phillip's plugin is clearly better than mine, but I think they serve different purposes. If I was emulating pretty much everything that DetectSyntax was, then I'd agree with you

So your issue with DetectSyntax is that it use regex, right ?I'm pretty sure that phillip.koebbe can add something like "first_line_noregex" to is config file in less that five minutes.. if he want... and if you ask him...

vxnick wrote:Anyway, if Will Bond decides that my plugin isn't suitable for Package Control then that's fine

I totally disagree with this view.It's not the job of wbond to check every package that people want to be added to Package Control, with the current trend it will a full time job in a few months...This is a community driven repository so people could and have to give their opinions about its content, and this is why three people already ask you to think about it's inclusion in Package Control.

And don't get me wrong, I've nothing personal against you or your code, actually your code is very good and well commented.I expect to see more of your plugins in Package Control in future, simply not this one...