1
0
mirror of https://github.com/amix/vimrc synced 2025-02-28 14:12:51 +08:00
amix-vimrc-mirror/sources_non_forked/vim-snippets/snippets/javascript/javascript.es6.snippets

53 lines
692 B
Plaintext
Raw Normal View History

2015-12-08 21:20:04 +08:00
snippet const
2016-02-20 21:13:10 +08:00
const ${1} = ${0};
2015-12-08 21:20:04 +08:00
snippet let
2016-02-20 21:13:10 +08:00
let ${1} = ${0};
2015-12-08 21:20:04 +08:00
snippet im
2016-02-20 21:13:10 +08:00
import ${1} from '${0}';
2015-12-08 21:20:04 +08:00
snippet cla
2016-02-20 21:13:10 +08:00
class ${1} {
${0}
2015-12-08 21:20:04 +08:00
}
snippet clax
2016-02-20 21:13:10 +08:00
class ${1} extends ${2} {
${0}
2015-12-08 21:20:04 +08:00
}
2016-11-10 01:22:55 +08:00
snippet clac
class ${1} {
constructor(${2}) {
${0}
}
}
# For of loop
snippet foro
for (let ${1:prop} of ${2:object}) {
${0:$1}
}
# Generator
snippet fun*
function* ${1:function_name}(${2}) {
${0}
}
snippet c=>
const ${1:function_name} = (${2}) => {
${0}
}
snippet caf
const ${1:function_name} = (${2}) => {
${0}
}
2015-12-08 21:20:04 +08:00
snippet =>
2016-02-20 21:13:10 +08:00
(${1}) => {
${0}
2015-12-08 21:20:04 +08:00
}
2015-12-16 21:53:53 +08:00
snippet af
2016-02-20 21:13:10 +08:00
(${1}) => {
${0}
2015-12-16 21:53:53 +08:00
}
2015-12-08 21:20:04 +08:00
snippet sym
2016-02-20 21:13:10 +08:00
const ${1} = Symbol('${0}');
2015-12-08 21:20:04 +08:00
snippet ed
export default ${0}
2016-02-20 21:13:10 +08:00
snippet ${
${${1}}${0}