Skip to content

Instantly share code, notes, and snippets.

@harish-r
Created March 10, 2018 06:53
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 harish-r/f1713d9c8c25149cd07156d760846110 to your computer and use it in GitHub Desktop.
Save harish-r/f1713d9c8c25149cd07156d760846110 to your computer and use it in GitHub Desktop.
{
"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": "g++ -g \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
}
]
}
@harish-r
Copy link
Author

Sublime Text 3 build file for Building and Running single C++ files.

Go to Tools -> Build system -> New Build System...
Paste the contents of this gist in the new file created.
Save it with a suitable name, say "cpp-build"

Close the file. Again go to Tools -> Build System
Select the "cpp-build"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment