Sublime Forum

Automatic Build System

#1

Hello every1!
I have some issues with Automatic Build System. I want to build scripts for SourcePawn language.
I have sublime build file for it, and it works, but only if I’m choosing Build System. I want make it works without choosing(Automatic option). I can’t define “selector” 'cause I haven’t .tmLanguage file. Although I can make it with:

"selector": "source.c, source.c++"

but then c++ files will compile via SourcePawn compiler.

0 Likes

#2

So, what is the file format you want to build? And what is its scope? If you don’t know the latter, do “ctrl+alt+shift+p” anywhere in the source file and check the first word which should be this file’s base scope. This is what you want for the “selector” property.

0 Likes

#3

It depends on which syntax highlighting I use :smiley:
I’m writing in SourcePawn language(extension - .sp)
ST2 hasn’t highlighting for it, so I often use c++ highlighting, it’s more similar to sourcepawn.

0 Likes

#4

Well, since you only can determine a build system according to the scope and you use the same scope (syntax definition) for SourcePawn and C++ respectively you have problems.
You can copy the c++ syntax and modify it slightly (change the “name” to “SourcePawn (C++)” or similar, change the base scope (“scopeName”) and the file extension). Then ST would automatically load this new syntax (due to the file extension) and you can use a build system for the new scope.

0 Likes