-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpp.snippets
More file actions
57 lines (47 loc) · 743 Bytes
/
Copy pathcpp.snippets
File metadata and controls
57 lines (47 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
snippet shell "CP shell"
#include <iostream>
using namespace std;
int main() {
$1
}
endsnippet
snippet case "for multiple cases" wA
int T;
cin >> T;
for (int case_num = 1; case_num <= T; case_num++) {
$1
}
endsnippet
snippet for "Basic for loop"
for ($1) {
$2
}
endsnippet
snippet wl "While loop" wA
while($1) {
$2
}
endsnippet
snippet fori "For loop with i" wA
for (int i = 0; i < $1; i++) {
$2
}
endsnippet
snippet forj "For loop with j" wA
for (int j = 0; j < $1; j++) {
$2
}
endsnippet
snippet forr "reverse for loop"
for (int i = $1; i >= 0; i--) {
$2
}
endsnippet
snippet p "paren"
($1)$2
endsnippet
snippet if "if statment" wA
if ($1) {
$2
}
endsnippet