Question

In Sublimt Text 2, when I use the build system (make) to run tests, the output is displayed in the build output pane.

However, if I press escape to close the output pane (e.g. to make a fix), I can't find a way to redisplay the output pane to see what else was borked. Have tried to create a custom keybinding to execute show_panel "output", but can't get it working.

Meep?

Was it helpful?

Solution

As you can see in Packages/Default/Main.sublime-menu the command for "Show build results" is this:

{
  "command": "show_panel", 
  "args": {
    "panel": "output.exec"
  },
  "caption": "Show Build Results",
  "mnemonic": "S"
},

so a custom key binding could be this:

{ 
  "keys": ["ctrl+alt+super+r"],
  "command": "show_panel", 
  "args": {
    "panel": "output.exec"
  }
}

OTHER TIPS

The menu shortcut is under Tools -> Build Results -> Show Build Results.

I wish this was under the View menu like all the rest of view options...

And the key binding to hide the panel:

{
  "keys": ["ctrl+shift+2"], 
  "command": "hide_panel", 
  "args": {
    "panel": "output.exec"
   }
},

Building on akirk's answer you can make it toggle the build results panel by copying some of the syntax used for the escape shortcuts.

Adding the following lines to the user key bindings will do part of the trick. As reported by some of the previous answers the hide_panel command will hide any panel, and pressing it a second time will reveal build_results.

{ 
    "keys": ["alt+b"], "command": "show_panel", "args": {"panel": "output.exec"},"context":
    [
        { "key": "panel_visible", "operator": "equal", "operand": false }
    ] 
},
{ 
    "keys": ["alt+b"], "command": "hide_panel", "args": {"panel": "output.exec"},"context":
    [
        { "key": "panel_visible", "operator": "equal", "operand": true }
    ] 
},
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top