Sublime Forum

How to hide Sublime inline build errors?

#1

Sometimes when I build a source file with Sublime it calls out the line of the error as shown:

Except then I need to scroll all the way to side to close it.

Is there a keybinding to close the callout? Or is it possible to disable them all together?

Thanks :smiley:

0 Likes

#2

These are called phantoms. In theory, they are controlled by the show_errors_inline setting, which defaults to true, so turning it off stops this from happening altogether:

    // Shows build errors just under the line on which they occur.
    "show_errors_inline": true,

I say “in theory” because this setting only applies to build systems that don’t go out of their way to subvert it. For example. all of the build systems that ship with Sublime work as expected, but the TypeScript plugin ignores what you set this to and shows them inline as you type anyway.

Depending on how the phantoms are getting inserted, you can use a key binding such as the following to clear them away. This will work if they were put there as a result of you using the build command; plugins that use their own custom build systems may or may not have their phantoms cleared by this binding.

    {
        "keys": ["ctrl+alt+shift+c"],
        "command": "exec",
        "args": {
            "hide_phantoms_only" : true
        }
    }
2 Likes

Remove build output from window/file
#3

Thank you @OdatNurd! Wishing you a happy holidays also :smiley:

0 Likes