Sublime Forum

Not automatic change of Build System

#1

For example, I have file Preview in Pale Moon.sublime-build:

{
    "shell_cmd": "\"E:/Pale Moon/Palemoon-Portable.exe\" \"$file\"",
    "selector": ["text.html.basic", "text.xml"]
}

And I have Listing.sublime-build file:

{
    "shell_cmd": "ls -l",
    "selector": "text.html.markdown.gfm",
}

ToolsBuild SystemAutomatic. I start, for example, the file with the .md extension:

key evt: f7
command: build
Running "E:/Pale Moon/Palemoon-Portable.exe" "E:\Киролайна\Sasha Prosperity.md"

Or .py extension:

key evt: f7
command: build
Running "E:/Pale Moon/Palemoon-Portable.exe" "E:\Киролайна\Test.py"

If I choose Build System manually, everything is good.

key evt: f7
command: build
Running ls -l

key evt: f7
command: build
Running python -u "E:\Киролайна\Test.py"

But why automatic switching is wrong and Preview in Pale Moon.sublime-build run not only in html and xml files and everywhere? What do I do incorrectly?

Thanks.

0 Likes

#2

Selector needs to be a string.

"selector": "text.html.basic, text.xml"
1 Like

#3

Thank you very much! Wes Bos was mistaken?

0 Likes

#4

Well, there is absolutely no need to have this functionality since selectors by themselves support basic operations on sets (e.g. unions), so I’d say yes. I’ve also never seen this anywhere before.

@wesbos, you prolly want to fix that. :wink:

1 Like