Skip to content

WatcherOne/Extensions-VsCodeSnippets

Repository files navigation

zb-snippets

some snippets for visual studio code

snippets in action snippets in action

Prefix
z-reset
html {
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clearfix::after {
    display: block;
    content: "";
    clear: both;
}
Prefix
z-desc
/*************************************************************
 * Author: xxxxxxx
 * Emails: <xxxxxxxx>
 * CreateTime: -- ::
 * Description: xxxxxxxxxxxxxx
*************************************************************/
Prefix
z-map
.map(item => item.)
Prefix
z-mapr
.map(item => {
    return item
})
Prefix
z-fore
.forEach(item => {

})
Prefix
z-settime
setTimeout(() => {
    
}, 0)
Prefix
z-settimel
setTimeout(() => console.log(1), 0)
Prefix
z-l
console.log(1)
Prefix
z-slot
<template #default="scope">
    <span></span>
</template>

Supported languages

  • vue(.vue)
  • HTML(.html)
  • javascript(.js)
  • typescript(.ts)
  • pug(.pug)

2022/07/19 (2.0.0)
  • change snippets name and burst some module
2022/07/16 (1.0.1)
  • updated more description and fixed some snippets
2022/07/16 (1.0.0)
  • Frist version to try use

开发VsCode插件流程

  1. 全局下载VS插件脚手架
  2. 生成模版
  3. 全局下载插件发布控件
    • 打包插件
  4. 先登陆 发布者
  5. 在直接发布
  6. 只能登陆后删除某个发布者,在平台不能删除
1. npm install -g yo generator-code
2. yo code
3. npm install -g vsce
4. vsce package
5. vsce login XX
6. vsce publish
7. vsce delete-publisher XX