Skip to content

Instantly share code, notes, and snippets.

@SunMendi
Created February 22, 2022 10:46
Show Gist options
  • Select an option

  • Save SunMendi/cf912fc222a7ad7060a12e2fc96bdbe0 to your computer and use it in GitHub Desktop.

Select an option

Save SunMendi/cf912fc222a7ad7060a12e2fc96bdbe0 to your computer and use it in GitHub Desktop.
sublime c windows
{
"cmd": ["g++.exe","-std=c++14", "${file}", "-o", "${file_base_name}.exe", "&&" , "${file_base_name}.exe<inputf.in>outputf.in"],
"shell":true,
"working_dir":"$file_path",
"selector":"source.cpp"
}
{
"cmd": ["g++", "-o", "${file_path}/${file_base_name}.exe", "-static-libgcc", "-static-libstdc++", "*.cpp"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.cpp, source.c++",
"path": "c:/Program Files/mingw-w64/mingw64/bin",
"shell": true,
"variants": [
{
"name": "Run",
"cmd": ["g++", "-o", "${file_path}/${file_base_name}.exe", "-static-libgcc", "-static-libstdc++", "*.cpp", "&", "${file_path}/${file_base_name}.exe"]
}
]
}
{
"cmd": ["g++.exe","-std=c++14", "${file}", "-o", "${file_base_name}.exe", "&&" , "${file_base_name}.exe<inputf.in>outputf.in"],
"shell":true,
"working_dir":"$file_path",
"selector":"source.cpp"
}
{
"cmd" : "gcc $file_name -o ${file_base_name} && ${file_base_name}",
"selector" : "source.c",
"shell": true,
"working_dir" : "$file_path"
}
<snippet>
<content><![CDATA[
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void solve()
{
}
int main()
{
int t=1;
cin>>t;
while(t--) solve();
}]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>play</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.c++</scope>
</snippet>
{
"cmd":["bash", "-c", "g++ -std=c++14 -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.c++",
"variants":
[
{
"name": "Run",
"cmd":["bash", "-c", "g++ -std=c++14 '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment