There is indeed a way to change this; I guess technically I would call it a workaround since it doesn’t immediately apply to every build output and requires you to modify the sublime-build
file for any build that you want to change.
One of the arguments that a sublime-build
can take is syntax
, which specifies what syntax to apply to the output view. The default value if that argument is not supplied is the Plain Text
syntax. By supplying your own syntax to the build, you can apply your own syntax specific settings, which can be anything (including not only the font size but also spelling).
To do so, you would first create a file named Build Output.sublime-syntax
in your User
package with the following contents:
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Build Output
scope: text.plain.build
hidden: true
contexts:
main: []
This creates a new syntax for use in our build output; it’s essentially the plain text syntax but with a different scope applied so that we can distinguish it as build output. The hidden: true
hides the syntax from the command palette and menus; you can remove that if so desired.
With that in place, you can then create a file named Build Output.sublime-settings
(i.e. it has to be named the same as the syntax file) and in that file apply any syntax specific settings that you want. For example:
{
"font_size": 7,
"spelling_selector": "-text.plain.build"
}
This alters the font size and also turns off spelling by excluding the build output top level scope (from the syntax definition) while inside the build output.
With that in place, you’re ready to roll. For any sublime-build
you can include a syntax
key and point it to this syntax, which will make that build use this syntax in the panel, applying the appropriate settings.
A simple example of that based on the above is:
{
"shell_cmd": "dir",
"syntax": "Packages/User/Build Output.sublime-syntax"
}