Skip to content

Instantly share code, notes, and snippets.

@monkindey
Created November 18, 2014 04:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monkindey/088b29d137f682764938 to your computer and use it in GitHub Desktop.
Save monkindey/088b29d137f682764938 to your computer and use it in GitHub Desktop.
Sulime Text C 环境构建配置文件
/**
* @author others|monkindey
* @date 2014-11-18
* @reference http://sublime-text.readthedocs.org/en/latest/reference/build_systems.html
*/
{
// 命令执行
"cmd": ["gcc", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
// 当前工作目录
"working_dir": "${file_path}",
// 当选择Tools|Build System|Automatic,Sublime Text找到适合的文件进行构建
"selector": "source.c",
"variants": [{
"name": "Run",
"cmd": ["cmd", "/c", "gcc", "${file}", "-o", "${file_path}/${file_base_name}", "&&", "cmd", "/c", "${file_path}/${file_base_name}"]
}, {
"name": "RunInCommand",
"cmd": ["cmd", "/c", "gcc", "${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & pause"]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment