sublime-phpcs icon indicating copy to clipboard operation
sublime-phpcs copied to clipboard

Plugin in multiple environments

Open dmaglio opened this issue 8 years ago • 3 comments

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

dmaglio avatar Oct 13 '17 10:10 dmaglio

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

benmatselby avatar Oct 23 '17 16:10 benmatselby

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

dmaglio avatar Oct 28 '17 16:10 dmaglio

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.

benjivm avatar Jan 24 '20 16:01 benjivm