Sublime Forum

Build with or Ctrl+Shift+B not working

#1

If I click on the submenu item Build with or use the keyboard shortcut Ctrl+Shift+B it doesn’t work.

It builds the file instead.

I’ve tried disabling all plugins.

I’ve also tried the keyboard short conflict plugin but it doesn’t list any conflicts there either.

0 Likes

#2

This normally happens only if there is only one active build command available.

What does console display with sublime.log_commands(True) ?

I see command: build {"select": true}

0 Likes

#3

Thanks, I’ve tested other builds and they appear to work ok.

It’s only when I’m building a JavaScript file.

This is the output:

>>> sublime.log_commands(True)
command: drag_select {"event": {"button": 1, "x": 520.5, "y": 1023.5}}
command: build {"select": true}
command: quick_panel {"items": [{"args": {"build_system": "Packages/PackageDev/Package/Convert to ....sublime-build", "choice_build_system": true, "choice_variant": true, "variant": ""}, "caption": "Convert to ...", "command": "build"}, {"args": {"build_system": "Packages/PackageDev/Package/Convert to ....sublime-build", "choice_build_system": true, "choice_variant": true, "variant": "JSON"}, "caption": "Convert to ... - JSON", "command": "build"}, {"args": {"build_system": "Packages/PackageDev/Package/Convert to ....sublime-build", "choice_build_system": true, "choice_variant": true, "variant": "Property List"}, "caption": "Convert to ... - Property List", "command": "build"}, {"args": {"build_system": "Packages/PackageDev/Package/Convert to ....sublime-build", "choice_build_system": true, "choice_variant": true, "variant": "YAML (Block Style)"}, "caption": "Convert to ... - YAML (Block Style)", "command": "build"}, {"args": {"build_system": "Packages/PackageDev/Package/Convert to ....sublime-build", "choice_build_system": true, "choice_variant": true, "variant": "YAML (Default Style)"}, "caption": "Convert to ... - YAML (Default Style)", "command": "build"}]}

Here’s my build for JS.

{
  "selector": "source.js",
  "file_patterns": ["*js"],
  "cmd": ["C:/Program Files/nodejs/node.exe", "$file"],
}

Edit: I see what you mean about only one build. I have three here that I want to choose from. I think I need to add a file_patterns extension to each.

0 Likes

#4

As @deathaxe had mentioned this only happens if one build exists.

I fixed the issue by changing the file_patterns property of each build file.

  "file_patterns": ["*jsx", "*js", "*jse"],

Now this is what shows:

image

0 Likes