benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
812 stars 126 forks source link

Plugin in multiple environments #183

Open dmaglio opened 7 years ago

dmaglio commented 7 years ago

I use this plugin in my home pc (windows) and my work pc (linux). i use Sync Settings to sync between the machine but every time i lost the path because is different between windows and linux. as an upgrade I thought if you could have more path variables for windows and linux

benmatselby commented 7 years ago

@dmaglio Could you give me an example for the above please. So for Windows and Linux, what you would want to do etc.

dmaglio commented 7 years ago

for example:

"phpcs_windows_php_prefix_path": "c:\\xampp\\php\\bin\\php",

// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_windows_executable_path": "c:\\xampp\\php\\bin\\phpcs",

// Path to where you have the php-cs-fixer installed
"phpcs_windows_fixer_executable_path": "c:\\xampp\\php\\bin\\php-cs-fixer",

"phpcs_linux_php_prefix_path": "/usr/bin/php",

// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_linux_executable_path": "/usr/bin/phpcs",

// Path to where you have the php-cs-fixer installed
"phpcs_linux_fixer_executable_path": "/usr/local/bin/php-cs-fixer",

"phpcs_osx_php_prefix_path": "/usr/bin/php",

// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_osx_executable_path": "/usr/bin/phpcs",

// Path to where you have the php-cs-fixer installed
"phpcs_osx_fixer_executable_path": "/usr/local/bin/php-cs-fixer",

or

"phpcs_php_prefix_path": {
    "windows": "c:\\xampp\\php\\bin\\php",
    "linux": "/usr/bin/php"
},

// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_executable_path": {
    "windows": "c:\\xampp\\php\\bin\\phpcs",
    "linux": "/usr/bin/phpcs"
},

// Path to where you have the php-cs-fixer installed
"php_cs_fixer_executable_path": {
    "windows": "c:\\xampp\\php\\bin\\php-cs-fixer",
    "linux": "/usr/local/bin/php-cs-fixer"
},

i don't known if it's possible. i want to known if it's possibile to have multiple version of settings for different environments

benjivm commented 4 years ago

Your 2nd example is how other plugins do it. This is a much-needed change: I work on all 3 major OSes and it's a pain to manually sync settings because of this.