From 357237bc84d0e61b05dc2b9b9cadb3357748714b Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 22 Oct 2021 20:26:40 +0100 Subject: [PATCH] update --- UltiSnips/javascript.snippets | 36 +++++++++++++++++++++------------- UltiSnips/markdown.snippets | 19 +++++++++++++++--- spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 2349 -> 2354 bytes 4 files changed, 39 insertions(+), 17 deletions(-) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index 3302bfe..70c248e 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -12,24 +12,16 @@ snippet cl "console.log( ... )" console.log($0); endsnippet -snippet if "if ( ... ) { ... }" -if ($1) { +snippet .fe "...forEach( ... );" i +.forEach(($1) => { $0 -} +}); endsnippet -snippet ifelse "if ( ... ) { ... } else { ... }" -if ($1) { - $2 -} else { +snippet .ae "...addEventListener( ... );" i +.addEventListener('$1', ($2) => { $0 -} -endsnippet - -snippet for "for ( ... ) { ... }" -for (let ${1:index} = ${2:0}; $1 $3; $1${4:++}) { - $0 -} +}); endsnippet snippet st "setTimeout( ... )" @@ -37,6 +29,22 @@ setTimeout(() => {$0 }, ${1:1000}); 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 ..." import React from "react"; diff --git a/UltiSnips/markdown.snippets b/UltiSnips/markdown.snippets index 25cbc93..3bc81ff 100644 --- a/UltiSnips/markdown.snippets +++ b/UltiSnips/markdown.snippets @@ -1,8 +1,21 @@ -snippet ln "[...](...)" -[$1]($2) +snippet l "[...](...)" +[${1:title}](${2:url}) endsnippet -snippet cd "``` ..." +snippet c "``` ..." \`\`\`$0 \`\`\` 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 diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 20ec91c..8610293 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -179,3 +179,4 @@ ajax mimetype thumbnailers Diagonalisation +yah diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index e0e30d0c1d8698fcebf1ed037172e710687cb38f..0bf149f5f1151273af3453aa86f51cf02b3dbc44 100644 GIT binary patch delta 35 rcmZ20v`L6B%+t5HAT=k)=syDkYuHA