Sublime Forum

How do I remove or hide [Finished in 0.4s] in console when running code?

#1

Hi,

Newbie to Sublime Text 3.0 here fumbling my way around the editor and Ruby after a stint on codecademy.

Please can anyone suggest how I hide / temporarily remove this text—> [Finished in 0.4s] at the end of my program output in the console window?

Google yielded
http://www.sublimetext.com/docs/build
and I assume I have to look for - showWhenFinished:true - and change to false in Preferences/Settings but showWhenFinished is nowhere to be seen in that file.

Cheers for your help.

1 Like

#2

You can modify the build system to include "quiet": true to silence that output, although if I recall correctly it may also stop things like telling you if the build failed from working as well.

There is a more extensive up to date reference for all things Sublime in the Unofficial Documentation, which also includes a big section on build systems.

2 Likes

#3

“quiet”: true works to suppress the [Finished …] message, but the console panel still opens.

Is there a different or additional option that will suppress the console panel entirely?

Use case: I’m using a simple build system that opens Markdown documents in an external previewing app (Marked 2). There’s no error output in the console to worry about, and the build time is always 0.0 seconds. There’s just no value in opening the console panel for this situation, and I’d like to not have to close it every time I preview a Markdown doc.

0 Likes

#4

There is a global preference you can set (Preferences > Settings from the menu) that controls whether the build results panel opens or not:

// Shows the Build Results panel when building. If set to false, the Build
// Results can be shown via the Tools/Build Results menu.
"show_panel_on_build": true,

This setting defaults to true, so setting it to false will stop the panel from opening automatically.

That said, the exec command reads this setting directly from your user preferences, so it’s basically an all or nothing proposition; you can disable or enable it globally, but you can’t set an option in a particular build system, syntax specific setting or project specific setting that would turn it off for just that situation.

If that matters and you would like to sometimes have the panel open automatically and sometimes no, the build system you’re using would have to use a custom target that doesn’t directly invoke the exec command so that you can honor the setting coming from a different place.

0 Likes

#5

Yes but we can do this:
Instead of bringing conditions to showing panel, bring condition to what command to run. Don’t worry, we’ll just wrap the command.
If he needs panel to be always hidden, bind hidden_build to ctrl+b on markdowns. (Too lazy to search if it’s done by scope checking or a syntax specific setting, but yall can figure out.)
hidden_build is a multi command that does exactly what build command does, and then just presses esc.

0 Likes

#6

just press esc key

0 Likes