创建方法:Tools (工具)> Developer > New Snippet(新片段)
<snippet> <content> <![CDATA[ #include <bits/stdc++.h> using namespace std; #define INF 0x7f const int maxn =1e3+5; typedef long long ll ; typedef double dl ; #define f(i,l,r) for(int i=l;i<=r;++i) #define g(i,l,r) for(int i=l;i>=r;--i) int main() { freopen("in","r",stdin); return 0; }]]> </content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <tabTrigger>acm</tabTrigger> <!-- Optional: Set a scope to limit where the snippet will trigger --> <scope>source.c++</scope> </snippet>
ctrl + shift +s 保存为acm.sublime-snippet
输入acm + tab

本文介绍如何在Sublime Text中创建一个C++代码片段,包括宏定义、类型定义及基本输入输出操作,并演示了使用预设触发的方式加载代码模板。
810

被折叠的 条评论
为什么被折叠?



