This guide is deprecated. New content at docs.sublimetext.info
See also
Build systems provide a convenient way to supply arguments and environmental information to external programs and run them. Use build systems if you need to run your files through build programs like make, command line utilities like tidy, interpreters, etc.
Note
Executables called from build systems must be in your PATH.
Like many other configuration files in Sublime Text, build systems are JSON files. Fittingly, they have the extension .sublime-build.
Here’s an example of a build system:
{
"cmd": ["python", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
Required. This option contains the actual command line to be executed:
python -u /path/to/current/file.ext
In addition to options, you can use variables in build systems too, like we’ve done above with $file, which expands to the full path of the file underlying the active buffer.
Build systems must be located somewhere under the Packages folder (e. g. Packages/User).
Build systems can be run by pressing F7 or from Tools | Build.