Skip to content

Instantly share code, notes, and snippets.

@redcpp
Created November 2, 2017 23:36
Show Gist options
  • Save redcpp/efe69c29ad0798c092264a3bbc8d2282 to your computer and use it in GitHub Desktop.
Save redcpp/efe69c29ad0798c092264a3bbc8d2282 to your computer and use it in GitHub Desktop.
Build files for sublime
{
"shell_cmd": "g++ -DLOCAL -O2 -std=c++14 -Wall -Wextra -Wno-unused-result -static \"${file}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Compile & Run",
"shell_cmd": "g++ -DLOCAL -O2 -std=c++14 -Wall -Wextra -Wno-unused-result -static \"${file}\" && \"${file_path}/a.out\" < input.txt"
},
{
"name": "Run",
"shell_cmd": "\"${file_path}/a.out\" < input.txt"
},
{
"name": "Codeforces",
"shell_cmd": "python2 ${packages}/Codeforces/judge.py ${file_base_name} ${file_path}/${file_name}"
}
]
}
{
"shell_cmd": "python -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf-8"},
"variants":
[
{
"name": "Syntax Check",
"shell_cmd": "python -m py_compile \"${file}\"",
},
{
"name": "Generate test",
"shell_cmd": "python \"${file}\" > \"input.txt\"",
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment