2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-15 12:12:58 +00:00
steffen-dotfiles/nvim/snippets/javascript.snippets
2020-05-23 13:19:24 +02:00

79 lines
905 B
Plaintext

snippet c
const ${1:sth} = ${2:value};
endsnippet
snippet l
let ${1:sth} = ${2:value};
endsnippet
snippet for
for (let ${1:i} = 0; $1 <= ${2:var}; $1 += 1) {
${3}
}
endsnippet
snippet fun
const ${1:functionname} = (${2:argument}) => {
${3}
};
endsnippet
snippet =>
(${1}) => {
${2}
}
endsnippet
snippet mod
export default (${0:args}) => {
${1}
};
endsnippet
snippet im
import ${1:module} from '${2:modulename}';
endsnippet
snippet ife
if (${1:condition}) {
${2}
} else {
${3}
}
endsnippet
snippet if
if (${1:condition}) {
${2}
}
endsnippet
snippet switch
switch (${1:expression}) {
case '${2:case}':
${3}
break;
default:
${4}
break;
}
endsnippet
snippet case
case '${1:case}':
${2}
break;
endsnippet
snippet cl "console.log()"
console.log(${0:data});
endsnippet
snippet bug "console.log()"
console.log(${0:data});
endsnippet
snippet ct
console.table(${0:data});
endsnippet