Closed fstrube closed 11 years ago
Hi Franklin
You cannot do that as it stands but that is a rather nice enhancement. I will have a look to see what can be done.
I've just discovered this limitation, too. I was reading hte Sublime docs, and they state that this should work. I expect there's some extra work required by the plugin to read the right config though?
@Drarok Which docs specifically? Was it http://www.sublimetext.com/docs/2/projects.html and http://www.sublimetext.com/docs/2/settings.html? I've just tried to do this and it didn't seem to work.
Yep, those look familiar. I'll take a look at some other plugins, see if I can find one where this behaviour works. :)
This would be a very good enhancement indeed! However, isn't this something for the developers of Sublime Text 2?
I've not had chance to look into this yet but I believe plugins can achieve this but I'd need to change the way I read the settings file.
Just to add my support for this feature :+1:
This is currently on the reload-settings branch so I can do some more testing this week.
This has just been pushed to master and released in 6.2
Does this work in the same way as @fstrube suggested?
Slightly different: http://www.soulbroken.co.uk/2013/04/sublime-phpcs-now-supports-project-based-settings/ It is essentially named spaced within phpcs.
Brilliant stuff, just testing, great feature
Slightly different: http://www.soulbroken.co.uk/2013/04/sublime-phpcs-now-supports-project-based-settings/ It is essentially named spaced within phpcs.
This link is broken. Can you add the documentation to the wiki or readme?
Leaving a example here for anyone that might find this and the broken link. Your .project file should look something like this:
{
"folders":
[
{
"folder_exclude_patterns":
[
"node_modules/*",
"gulp/*",
"builds/*",
"src/themes/natura/assets/sass/.sass-cache"
],
"path": "/home/handrus/Projects/Taller/xpto"
}
],
"settings":
{
"phpcs":
{
"phpcs_additional_args":
{
"--standard": "/path/to/.composer/vendor/drupal/coder/coder_sniffer/Drupal"
}
}
}
}
Of course this is a example to apply Drupal code sniffer. This could be anything. Whatever you can have on this package settings it can be overwritten under the settings -> phpcs
Thanks @handrus for writing this up - appreciate it.
I've updated the github page with it: http://benmatselby.github.io/sublime-phpcs/#project-based-settings
Is there a way to specify per-project settings? For instance I would like my Magento projects to use a different standard than my CakePHP projects. I would like to do:
magento.sublime-project