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
}
}