
新建一个全局的,粘贴进去
{// "名称": {// "scope": "适用的文件类型",// "prefix": "用来触发的前缀",// "body": [// // 你的代码,每行都要用双引号引起来,每行之间要加逗号。// // 断点用“$+数字”表示,有默认值的用{:}表示,最后要停的地方是$0。// "${1:fun}()",// "{",// " $2",// " return $0;",// "}"// ]// },"c main body": {"scope": "c,cpp","prefix": "cmain","body": ["#include <stdio.h>","// #include <stdlib.h>\n","int main() {\n\t$0\n}"],},"cpp main body": {"scope": "c,cpp","prefix": "cppmain","body": ["#include <cstdio>","// #include <iostream>","using namespace std;\n","int main() {\n\t$0\n}"],},"ios sync": {"scope": "c,cpp","prefix": "iossync","body": ["ios::sync_with_stdio(false);\ncin.tie(0);"]},"long long int": {"scope": "c,cpp","prefix": "LL","body": ["typedef long long LL;\n"],},"vector<int>": {"scope": "c,cpp","prefix": "vi","body": ["vector<int> "],},"define the max": {"scope": "c,cpp","prefix": "MAX","body": ["#define MAX $0"],},"n groups of test data": {"scope": "c,cpp","prefix": "n--","body": ["int ${1:n};","scanf(\"%d\", &${1:n});","while (${1:n}--)\n{\n\t$0\n}",],},"for i++": {"scope": "c,cpp","prefix": "fori","body": ["for (int ${1:i} = ${2:0}; ${1:i} < ${3:size}; ${1:i}++) {","\t$0\n}"]},"for i--": {"scope": "c,cpp","prefix": "for-","body": ["for (int ${1:i} = ${2:size - 1}; ${1:i} >= 0; ${1:i}--) {"," $0","}"]},"format print data": {"scope": "c,cpp","prefix": "print","body": ["for (int ${1:i} = 0; ${1:i} < ${2:size}; ${1:i}++)","\tprintf(\"%d%c\", ${3:a}[${1:i}], \" \\n\"[i == ${2:size} - 1]);"]},"LeetCode Lintcode": {"scope": "c,cpp","prefix": "lcode","body": ["#include <bits/stdc++.h>\nusing namespace std;\n$0","int main() {\n\tSolution a;\n\t;\n\treturn 0;\n}"]}}
{"gcd": {"scope": "c,cpp","prefix": "gcd","body": ["${1:LL} gcd(${1:LL} m, ${1:LL} n)","{"," while (n != 0)"," {"," ${1:LL} t = m % n;"," m = n;"," n = t;"," }"," return m;","}",""]},"isPrime": {"scope": "c,cpp","prefix": "isPrime","body": ["int isPrime(int n)","{"," if (n == 1 || n == 0)"," return 0;"," for (int i = 2; i <= n / i; i++)"," if (n % i == 0)"," return 0;"," return 1;","}"]}}
