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