Or they don't work? Will you please post the entirety of DetectSyntax.sublime-settings (your customized one), minus comments? I'd like to figure out why that happens. From looking at the rules, there should be no reason why the is_rails_file function would hit. It looks only for .rb/.rake files in a Rails directory structure.

Rename ~/Application Support/Sublime Text 2/phillipkoebbe-DetectSyntax to ~/Application Support/Sublime Text 2/DetectSyntax and it should work. The function rule looks for the file in User/ and then DetectSyntax/ and because it didn't find it, it raised an error. If you try it again with the twig rule after the function rule, and view your console, you should see it. When I wrote the function processing part, I originally had exception handling in there to catch stuff like that and just return false, but then I decided to remove that in favor of letting the exceptions bubble up so those writing functions would get feedback when things didn't work right. I think I'll add an option in the settings that controls whether exceptions are handled gracefully or bubble up. I'll default to handling errors properly so the average user won't experience this problem.

I will also look for a way to determine the plugin's directory at runtime. That would have also avoided your pain.

I saw that when I was adding the package to the repository but I thought it was primarily for when your repository has one thing but you want the package to show up as something else. The GitHub repository name is the same as what I'd like the package to be. Either way, it isn't available in Package Control yet. I've submitted a pull request, but have not received a response.

I think, in this case, the package was downloaded from GitHub. When I download it by clicking the ZIP icon, it comes down as phillipkoebbe-DetectSyntax.zip. Unzipping in the Packages directory would place it in the wrong directory. It would just add a nice bit of user-friendliness if I could determine the directory at runtime.

I added an option (reraise_exceptions) to the settings file which controls whether the function rule will fail silently and just return False or reraise any exception encountered. Default is false, don't reraise exceptions. If you work on a function rule, though, you should turn reraise_exceptions on while developing so you'll know why it fails (if it does). Once satisfied that your function works correctly, you can then turn reraise_exceptions off again.