Ubuntu16.04下Sublime Text3保存SublimeOnSaveBuild配置报错求助
Hey there, let's get this sorted out quickly! The error you're seeing happens because you're trying to modify the Settings - Default file for SublimeOnSaveBuild, which isn't the right approach—and here's why, plus how to fix it:
Why This Error Occurs
Sublime Text's plugin system is designed so that Default settings files are read-only (or shouldn't be modified directly). These files are part of the plugin's core installation, and attempting to save changes to them can either fail (like your error) or get overwritten when the plugin updates. You only ever need to use the Settings - User file to customize plugin behavior—it automatically overrides the default settings.
Step-by-Step Fix
- Close the Settings - Default window immediately—don't keep trying to save it, that won't work.
- Verify your User settings are correctly applied:
- Open
Preferences -> Package Settings -> SublimeOnSaveBuild -> Settings - User - Make sure your custom config is still there (it should be, since you saved it earlier):
{ "filename_filter": "\\.(css|js|jsx|json|sass|less|scss)$", "build_on_save": 1 } - This single file is all you need to override the default settings—no changes to the Default file are required.
- Open
- Check if the plugin is installed properly (if the error persists):
- Press
Ctrl+Shift+Pand runBrowse Packagesto open your Sublime plugins directory. - Look for the
SublimeOnSaveBuildfolder. If it's missing, or if theSublimeOnSaveBuild.sublime-settingsfile isn't inside it:- Run
Ctrl+Shift+P→Remove Package, select SublimeOnSaveBuild to uninstall it. - Reinstall it via
Ctrl+Shift+P→Install Package→ search for SublimeOnSaveBuild.
- Run
- Press
- Restart Sublime Text and test saving a file that matches your
filename_filter(like a.jsor.cssfile)—the auto-build should work without errors now.
Key Takeaway
Always stick to modifying User settings files for any Sublime plugin. Default files are meant to be reference only, not editable. This avoids permission issues, file-not-found errors, and ensures your custom settings survive plugin updates.
内容的提问来源于stack exchange,提问作者Sharath

