Skip to content

Instantly share code, notes, and snippets.

@parthokr
Created November 16, 2020 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parthokr/1ec8f5c4e6676bcea9c8896502db00ef to your computer and use it in GitHub Desktop.
Save parthokr/1ec8f5c4e6676bcea9c8896502db00ef to your computer and use it in GitHub Desktop.
{
"cmd": ["start", "cmd", "/c", "echo Compiling... && g++ '${file}' -o ${file_base_name} && cls && ${file_base_name} && echo. && pause"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.cpp",
"shell": true,
"variants":
[
{
"name": "Build",
"cmd": ["g++", "${file}", "-o", "${file_base_name}"],
"shell": true
},
{
"name": "Run",
"cmd" : ["start", "cmd", "/c", "${file_base_name} && echo. && pause"],
"shell": true
},
{
"name": "Run with input.txt",
"cmd" : ["start", "cmd", "/c", "${file_base_name} < input.txt && echo. && pause"],
"shell": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment