create new build system
subl3 ~/.config/sublime-text-3/Packages/User/gcc.sublime-build
with the contents of
{
"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"shell_cmd": "terminator -e 'gcc \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\";echo;echo; echo Press ENTER to continue; read line;exit; exec bash'"
}
]
}
Based on https://stackoverflow.com/a/30724183/248823