vscode-snippet-js
desc
a basic javascript snippet for vscode editor by yemiancheng
feat
- [x] syntax
- [x] supported languages(file extensions) JavaScript (.js)
- [x] supported languages(file extensions) TypeScript (.ts)
- [x] supported languages(file extensions) JavaScript React (.jsx)
- [x] supported languages(file extensions) TypeScript React (.tsx)
- [x] supported languages(file extensions) Html (.html)
- [x] supported languages(file extensions) Vue (.vue)
Snippets
Below is a list of all available snippets and the triggers of each one. The ⇥ means the TAB key.
Trigger |
Desc |
|
|
comment_line→ |
"单行注释" |
|
|
comment_multi_line→ |
"多行注释" |
|
|
comment_multi_line_02→ |
"多行注释" |
|
|
do_while_multiline→ |
"循环语句:do while 多行写法" |
|
|
for_in_multiline→ |
"循环语句:for in 多行写法" |
|
|
for_multiline→ |
"循环语句:for 多行写法" |
|
|
for_oneline→ |
"循环语句:for 一行写法" |
|
|
function_define→ |
"函数定义:" |
|
|
if_multiline→ |
"条件语句:if 多行写法" |
|
|
if_oneline→ |
"条件语句:if 一行写法" |
|
|
if_oneline_02→ |
"条件语句:if 一行写法" |
|
|
logic_and→ |
"逻辑运算:与 a && b" |
|
|
logic_not→ |
"逻辑运算:非 !a" |
|
|
logic_or→ |
"逻辑运算:或 a |
|
b" |
math_add→ |
"算数运算:加法 a + b" |
|
|
math_devide→ |
"算数运算:除法 a / b" |
|
|
math_euqal→ |
"算数运算:相等 (a == b)" |
|
|
math_mod→ |
"算数运算:取余 a % b" |
|
|
math_multi→ |
"算数运算:乘法 a * b" |
|
|
math_not_euqal→ |
"算数运算:不等 (a != b)" |
|
|
math_sub→ |
"算数运算:减法 a - b" |
|
|
mod_export→ |
"模块导出" |
|
|
mod_export_class→ |
"模块导出 export default class class_name {};" |
|
|
mod_export_class_extend→ |
"模块导出 export default class class_name extends class_name2 {}" |
|
|
mod_export_fun→ |
"模块导出 export const fun_name = ()=>{};" |
|
|
mod_export_fun_default→ |
"模块导出 export default function fun_name (){}" |
|
|
mod_export_var→ |
"模块导出 export const var_name = var_value ;" |
|
|
mod_import_as→ |
"模块导入 import {x as x2} from 'fs'" |
|
|
mod_import_from→ |
"模块导入 import fs from 'fs'" |
|
|
mod_import_from_all→ |
"模块导入 import * as fs from 'fs'" |
|
|
mod_import_from_destructing→ |
"模块导入 import {x1,x2} from 'fs'" |
|
|
mod_import_no_name→ |
"模块导入 import 'xx'" |
|
|
mod_require→ |
"模块导入" |
|
|
mod_require_to_const→ |
"模块导入" |
|
|
mod_require_to_let→ |
"模块导入" |
|
|
mod_require_to_var→ |
"模块导入" |
|
|
style_name_camelcase→ |
"名字风格 驼峰式" |
|
|
style_name_prefix→ |
"名字风格 前缀式 比如全局变量,常量" |
|
|
style_name_underline→ |
"名字风格 下划式" |
|
|
style_name_upper→ |
"名字风格 大写式 比如全局变量,常量" |
|
|
switch_multiline→ |
"分支语句:switch 多行写法" |
|
|
var_define→ |
"变量定义" |
|
|
var_define_02→ |
"变量定义" |
|
|
var_define_multi→ |
"变量定义" |
|
|
var_define_multi_02→ |
"变量定义" |
|
|
var_delete→ |
"变量删除" |
|
|
var_delete_02→ |
"变量删除:对象属性删除" |
|
|
var_read→ |
"变量读取" |
|
|
while_multiline→ |
"循环语句:while 多行写法" |
|
|
author
yemiancheng ymc-github@gmail.com
license
MIT
reference
vscode-offical-user-defined-snippets
vscode-offical-snippet-guide
| |