Skip to content

Instantly share code, notes, and snippets.

@karngyan
Created September 12, 2020 13:04
Show Gist options
  • Save karngyan/7988aa54e5540de4b1781a08463015d1 to your computer and use it in GitHub Desktop.
Save karngyan/7988aa54e5540de4b1781a08463015d1 to your computer and use it in GitHub Desktop.
C++ Competitive Programming Sublime 3 Build + Terminus + Sanitizers
{
"target": "terminus_exec", // "terminus_open" - if using this you dont need cancel, simply close tab and watch this: https://youtu.be/etIJMVIvVgg
"cancel": "terminus_cancel_build",
"focus": false,
"timeit": true,
"shell_cmd": "g++ -std=c++17 -Wshadow -Wall -o \"${file_path}/${file_base_name}.o\" \"${file}\" -O2 -Wno-unused-result",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run (Sanitize)",
"shell_cmd": "g++ -std=c++17 -Wshadow -Wall -o \"${file_path}/${file_base_name}.o\" \"${file}\" -g -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG && \"${file_path}/${file_base_name}.o\""
},
{
"name": "Run (no Sanitize)",
"shell_cmd": "g++ -std=c++17 -Wshadow -Wall -o \"${file_path}/${file_base_name}.o\" \"${file}\" -g -D_GLIBCXX_DEBUG && \"${file_path}/${file_base_name}.o\""
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment