Skip to content

Instantly share code, notes, and snippets.

@jdhao
jdhao / C++.sublime-build
Last active September 1, 2023 09:59
Sublime text 3 C++ build system to run C++ executable within sublime text or in a terminal emulator in cases that the program need input from standard input. This build system works on Linux, Windows and MacOS
{
"shell_cmd": "g++ -std=c++11 -Wall \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c++, source.cpp, source.cc, source.cxx",
"variants":
[
{
"name": "Run in Terminal",