Idk man, haven't worked with
You basically just need to figure out the command/argument formats that
clang use, and then manipulate the strings passed from SublimeText into those formats.
PowerShell, I had to figure out a way to allow quoted commands in case the filepath contained spaces. The solution was to prefix the initial command with
& followed by a space. For your system, it might work right away, or you can figure out the proper syntax, or you can just ditch the quotes if your
cygwin path doesn't contain spaces.
I also had to pass the
-NoExit arg to keep the
PowerShell window open, so you might need to figure out something similar for
Here's my best attempt not having really worked with your toolset, you might need to play around with what's quoted and what's not and maybe some other formatting.
import sublime, sublime_plugin
def run(self, cmd=, file_regex=""):
filePath, fileName, fileBase, fileDirectory, projectName = cmd
quoted_FilePath = quote(filePath)
cygwin_EXE = quote("C:\\PATH\\TO\\cygwin.exe")
__ = ";" # Cygwin Command Separator
command__SetWorkingDirectory = "cd " + quote(filePath)
clang_EXE = quote("C:\\PATH\\TO\\clang-3.8.exe")
arg__Output = "-o "
command__BuildWithClang = clang_EXE + " " + arg__Output + quote(fileBase) + " " + quote(fileName) + " && " + quote("./$" + fileBase)
commands = [
text = '"' + text + '"'
"selector": "source.c, source.c++",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"cmd": ["$file", "$file_name", "$file_base_name", "$file_path", "$project_base_name"],