我阅读了在Google上弹出的类似帖子,但都没有解决该问题,因此我再次询问。
我想为C ++文件创建一个代码段,以使用以下代码行初始化一个新文件
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long l;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<int,pair<int,int> > tii;
typedef vector<pair<int,int> > vec_pii;
#define fastinput ios_base::sync_with_stdio(false); cin.tie(false);
#define mp make_pair
#define setbits(n) __builtin_popcount((n))
#define pb push_back
#define mod 1000000007
#define gcd(a,b) __gcd(a,b)
#define sf(n) scanf("%lld",&(n))
#define pf(n) printf("%lld\n",(n))
#define min3(a,b,c) (min((c),min((a),(b))))
#define max3(a,b,c) (max((a),max((b),(c))))
这是我想出的代码段代码(无效)。请更正该错误并验证其是否有效。
<snippet>
<content><![CDATA[
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long l;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<int,pair<int,int> > tii;
typedef vector<pair<int,int> > vec_pii;
#define fastinput ios_base::sync_with_stdio(false); cin.tie(false);
#define mp make_pair
#define setbits(n) __builtin_popcount((n))
#define pb push_back
#define mod 1000000007
#define gcd(a,b) __gcd(a,b)
#define sf(n) scanf("%lld",&(n))
#define pf(n) printf("%lld\n",(n))
#define min3(a,b,c) (min((c),min((a),(b))))
#define max3(a,b,c) (max((a),max((b),(c))))
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>newfile</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.cpp</scope>
</snippet>
更改
<scope>source.cpp</scope>
为
<scope>source.c++</scope>
您可以使用SublimeText的show_scope_name
命令或类似ScopeHunter的插件来为目标文档和区域找到正确的作用域名称。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句