Reputation: 12445
I am trying to edit the settings for an installed package for Sublime Text.
Background:
Laravel requires the Mcrypt PHP extension.
artisan
works fine. This leads me to believe that the PHP version used by Laravel 4 Artisan in Sublime Text is different from the version set up in my .bash_profile
.which php
returns /Applications/MAMP/bin/php/php5.4.10/bin/php
In Sublime Text, Package Settings > Laravel 4 Artisan > Settings - Default points to:
{
"php_path": "php"
}
These settings seem to be read-only. I cannot even change the text, let alone save it with the new PHP location.
Any ideas or am I missing something simple?
Upvotes: 11
Views: 7122
Reputation: 11
Also in case anyone is still struggling after doing this, remember to restart SublimeText to enable.
Upvotes: 1
Reputation: 19754
Happy to see you solved your problem. I'll clarify a bit to help anyone else who comes across this. You are correct in the fact that the settings are merged. The load order determines how these files are merged. The User
folder is always last. So whatever you specify there will always be taken over that of previous configurations.
Depending on how you installed your plugin, the "Default" settings that came with the plugin may be overwritten. So you don't want to make any changes there that you hope to persist, so placing them in the User
folder is the correct thing to do. As an additional note, you don't have to copy the entire contents of the "default" settings. Rather, you only need to specify the settings you want to override. Things will be merged appropriately.
One last thing, I don't believe ST2 makes the default settings read only. I do know ST3 does (well based on where it is installed). Be sure to post questions with the correct tag (sublimetext3 in this case). Was to long for a comment, but I hope this helps clarify things for you.
Upvotes: 6
Reputation: 12445
problem solved. The problem is me being a Sublime Text noob.
Solution for those of you who don't know:
Sublime text packages appear to have various settings modes. A default
mode and a user
mode.
If you copy the contents of default
mode over to user
mode, then edit user
mode. Then I believe that the settings in user will extend / override the settings in the default mode.
From what I can see, you cannot edit the settings in default.
So instead of { "php_path": "php" }
, user settings should be something like the following depending on your php setup.
{
"php_path": "/Applications/MAMP/bin/php/php5.4.10/bin/php"
}
Upvotes: 13