Edit a build system in Sublime Text 3
Asked Answered
C

1

12

How can I edit a build system in Sublime Text 3, whether its a native one or one I installed through Package Control? For instance, for the Sass Build package, it outputs .map files recently, so I'd like to configure it so that it stops doing that.

It seems to be different from Sublime Text 2 because those instructions don't seem to apply to what I have in my Sublime Text 3 folder.

And can I change them on a per-project basis?

Care answered 5/9, 2014 at 18:42 Comment(0)
R
18

Unlike Sublime Text 2, version 3 uses zipped .sublime-package files to contain both the default packages and plugins installed via Package Control. As a result, they don't all have folders within the Packages folder accessed via Preferences -> Browse Packages....

To access the files in these packages, use the PackageResourceViewer plugin. By default it adds PackageResourceViewer: Extract Package and PackageResourceViewer: Open Resource menu options to the Command Palette. Use Extract Package to completely unzip a package or plugin to the Packages directory, where its contents will override the original files in the .sublime-package archive. Use Open Resource to open a file within a package for viewing. This file can be edited, and if saved will be put in Packages/PluginName/file.name and will override the original.

While this feature is great, keep in mind that subsequent upgrades to an extracted plugin will not be applied, as the extracted files in Packages/PluginName override those in the PluginName.sublime-package archive. Monitor the Package Control messages that appear periodically in Sublime as well as your various plugins' pages on the Package Control website to see if you need to update your extracted files. The most conservative mode of action is to just extract individual files that you know you need to modify, allowing the rest of the plugin/package to be upgraded if needed.

Ratafia answered 5/9, 2014 at 19:26 Comment(1)
Great write-up, but the word 'plugin' in some places stumped me initially - I think you meant Packages/<PackageName>/<filename>, Packages/<PackageNam> and <PackageName>.sublime-package. Packages contain plugins (among other things), and here we're talking about packages.Ploughshare

© 2022 - 2024 — McMap. All rights reserved.