This commit is contained in:
Ray Elliott 2021-10-22 20:26:40 +01:00
parent e601f1d755
commit 357237bc84
4 changed files with 39 additions and 17 deletions

View File

@ -12,24 +12,16 @@ snippet cl "console.log( ... )"
console.log($0); console.log($0);
endsnippet endsnippet
snippet if "if ( ... ) { ... }" snippet .fe "...forEach( ... );" i
if ($1) { .forEach(($1) => {
$0 $0
} });
endsnippet endsnippet
snippet ifelse "if ( ... ) { ... } else { ... }" snippet .ae "...addEventListener( ... );" i
if ($1) { .addEventListener('$1', ($2) => {
$2
} else {
$0 $0
} });
endsnippet
snippet for "for ( ... ) { ... }"
for (let ${1:index} = ${2:0}; $1 $3; $1${4:++}) {
$0
}
endsnippet endsnippet
snippet st "setTimeout( ... )" snippet st "setTimeout( ... )"
@ -37,6 +29,22 @@ setTimeout(() => {$0
}, ${1:1000}); }, ${1:1000});
endsnippet endsnippet
snippet dq "document.querySelector( ... )"
document.querySelector($0)
endsnippet
snippet dqa "document.querySelectorAll( ... )"
document.querySelectorAll($0)
endsnippet
snippet cdq "const ... = document.querySelector( ... )"
const $1 = document.querySelector($0);
endsnippet
snippet cdqa "const ... = document.querySelectorAll( ... )"
const $1 = document.querySelectorAll($0);
endsnippet
snippet jsx "import React ..." snippet jsx "import React ..."
import React from "react"; import React from "react";

View File

@ -1,8 +1,21 @@
snippet ln "[...](...)" snippet l "[...](...)"
[$1]($2) [${1:title}](${2:url})
endsnippet endsnippet
snippet cd "``` ..." snippet c "``` ..."
\`\`\`$0 \`\`\`$0
\`\`\` \`\`\`
endsnippet endsnippet
# latex
snippet vc "vector"
\\begin{bmatrix} $1 \\\\ $2 \\end{bmatrix}
endsnippet
snippet mx "matrix"
\\begin{bmatrix} $1 & $2 \\\\ $3 & $4 \\end{bmatrix}
endsnippet
snippet lmb "lambda" i
\\lambda $0
endsnippet

View File

@ -179,3 +179,4 @@ ajax
mimetype mimetype
thumbnailers thumbnailers
Diagonalisation Diagonalisation
yah

Binary file not shown.