Sublime Forum

[Solved] How to bind the key F7 to show the last build results?

#1

How to bind the key F7 to:

  1. Show the last build results when they are hidden
  2. Build when the build results are show

Something like this

{ "keys" : ["F7"], "command" : "show_panel" , "args" : { "panel": "output.exec" }, "context":
    [
        { "panel": "output.exec", "operator": "equal", "operand": false },
    ]
},

{ "keys" : ["F7"], "command" : "build", "context":
    [
        { "panel": "output.exec", "operator": "equal", "operand": true },
    ]
},
0 Likes

#2

This is what a context entry concerning panels should look like:

  // Toggle exec output
  { "keys": ["ctrl+f4"], "command": "show_panel", "args": {"panel": "output.exec"} },
  { "keys": ["ctrl+f4"], "command": "hide_panel", "args": {"panel": "output.exec"},
    "context": [
      { "key": "panel", "operand": "output.exec" }
    ]
  },
1 Like

#3

Thanks, I get it working:

{ "keys": ["f7"], "command": "show_panel", "args": {"panel": "output.exec"} },
{ "keys": ["f7"], "command": "build", "context":
    [
      { "key": "panel", "operand": "output.exec" }
    ]
},
0 Likes

#4

This doesn’t work for me anymore in the newest build. Am I the only one with that problem or is it something to do with phantoms showing but the build panel still pops up with errors but I can’t hide it and show it with the command above. Any suggestions?

0 Likes

#5

The above is working fine on the latest build 3126. Its purpose is:

  1. If the Build Output Panel is hidden, and F7 is hit, the Build Output Panel will be show.
  2. If the Build Output Panel is show, and F7 is hit, the Build Output Panel will run the build command.
0 Likes