Build systems let you run your files through external programs like make, tidy, interpreters, etc.
Executables called from build systems must be in your PATH. For more information about making sure the PATH seen by Sublime Text is set correctly, see Troubleshooting Build Systems.
Build systems are JSON files and 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 also use some variables in build systems, like we have done above with $file, which expands to the the active buffer’s file name.
Build systems must be located somewhere under the Packages folder (e. g. Packages/User). Many packages include their own build systems.
Build systems can be run by pressing F7 or from Tools | Build.
See also