Skip to content

Instantly share code, notes, and snippets.

@fossil12
Created January 15, 2014 19:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fossil12/8443191 to your computer and use it in GitHub Desktop.
Save fossil12/8443191 to your computer and use it in GitHub Desktop.
Sublime Text 2 Build System for C on OS X. (Just move/copy file to `Packages/User`.)
{
"cmd": ["gcc", "${file}", "-o", "${file_path}/${file_base_name}", "-Wall"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c",
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "gcc '${file}' -o '${file_path}/${file_base_name}' -Wall && '${file_path}/${file_base_name}'"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment