angular-ui / AngularJS-sublime-package

AngularJS code completion, snippets, go to definition, quick panel search, and more.
MIT License
1.42k stars 169 forks source link

Disable case sensitive in match_expression #66

Closed max-mykhailenko closed 10 years ago

max-mykhailenko commented 10 years ago

My module name is someApp and your default "match_expression" doesn't see all my stuff.

"match_expression": "((^[ \\\\t]*\\.{0}|^[ \\\\t]*{0}|angular\\.{0}|\\)\\.{0}|app\\.{0})[ ]*\\([ ]*[\"\\'])([\\w\\.\\$]*)([\"\\'])",

But after changing it, all works fine:

"match_expression": "((^[ \\\\t]*\\.{0}|^[ \\\\t]*{0}|angular\\.{0}|\\)\\.{0}|App\\.{0})[ ]*\\([ ]*[\"\\'])([\\w\\.\\$]*)([\"\\'])",
subhaze commented 10 years ago

Adjusting it to be case insensitive could produce false positives when parsing through all the JS files and still wouldn't solve issues where others might not use app and something else entirely.

match_expression was placed out in the settings file for cases like this. If your style doesn't match what's defined it can be adjusted. I've moved the area talking about the regex used while indexing in the readme up into the Indexing Options section and have added some comments on how to modify this setting to allow for more than just one name. https://github.com/angular-ui/AngularJS-sublime-package#indexing-options

Hope this helps!