C: malloc, str functions | TeX: integral, bold
- sh: var with quotes
This commit is contained in:
16
c.snippets
16
c.snippets
@@ -3,3 +3,19 @@ for (int i = 0; i < ${1:count}; i++) {
|
|||||||
${2}
|
${2}
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet mlc "malloc" i
|
||||||
|
= malloc(sizeof(${1:type}) * ${2:amt});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet stl "strlen"
|
||||||
|
strlen(${1:var})
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet scp "strcpy"
|
||||||
|
strcpy(${1:dest}, ${2:str});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cmt "Line comment" b
|
||||||
|
/* ${1:text} */
|
||||||
|
endsnippet
|
||||||
|
|||||||
@@ -12,3 +12,11 @@ ${1:name}() {
|
|||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet evr "Var with escaped quotes" i
|
||||||
|
\"$${1:var}\"
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet vr "Var with quotes" i
|
||||||
|
"$${1:var}"
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
snippet ts "Tabstop"
|
snippet ts "Tabstop" i
|
||||||
${${1:number}:${2:default}}
|
${${1:number}:${2:default}}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
|||||||
7
tex.snippets
Normal file
7
tex.snippets
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
snippet bf "Boldface" i
|
||||||
|
\textbf{$0}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet geq "Geq eqn" i
|
||||||
|
$\geq $0$
|
||||||
|
endsnippet
|
||||||
@@ -13,3 +13,7 @@ snippet pwf "Piecewise function" b
|
|||||||
\right\\}
|
\right\\}
|
||||||
\]
|
\]
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet int "Integral" i
|
||||||
|
\int_{${1:lower}}^{${2:upper}} \, \mathrm{d}${3:x}
|
||||||
|
endsnippet
|
||||||
|
|||||||
Reference in New Issue
Block a user