Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>super code snippetsNew to Visual Studio Code? Get it now.
super code snippets

super code snippets

CHT

|
3 installs
| (1) | Free
js/ts/css/scss/node代码提示插件
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

code snippets for js/ts/css/scss

supported Language

  • JavaScript
  • typescript
  • css
  • scss
  • vue
  • jsx
  • tsx

js

  • qs => querySelector($1)
  • qsa => querySelectorAll($1)
  • clg => console.log($1)
  • ctime => console.time($1)
  • ctimeEnd => console.timeEnd($1)
  • sto => setTimeout(() => { $2}, $1)
  • siv => setInterval(() => {$2}, $1)
  • pro => Promise
  • npro => new Promise((resolve) => { $1})
  • jsonclone => JSON.parse(JSON.stringify($1))
  • jstr => JSON.stringify($1)
  • jpar => JSON.parse($1)
  • uniqueArray => const ${2:uniqueArray} = [...new Set($1)];
  • map => array.map((${1:item}) => {$2})
  • forEach => forEach((${1:item}) => {$2});
  • filter => filter((${1:item}) => { $2});
  • constructor => constructor(){ $1}
  • `` => ${$1}
  • impfrom => import { $2 } from "${1:module}"
  • impdfrom => import $2 from "${1:module}"
  • impasfrom => import {${2:moduleName} as ${3} } from '${1:module}';
  • immfrom => import '${1:module}';
  • req => const ${2:packageName} = require('${1:module}')
  • var => var $1 = $2
  • ovar => var {$2} = $1
  • olet => let {$2} = $1
  • oconst => const {$2} = $1
  • let => let $1 = $2
  • const => const $1 = $2
  • function => function $1 (){ $2}
  • asfunction => async function $1 (){ $2}
  • anf => (params) => { $1}
  • methods => ${1:methods}($2){$3}
  • asmethods => async ${1:methods}($2){$3}
  • forin => for (const ${2:key} in ${1:object}) { const ${2:element} = ${1:object}[${2:key}];$3}
  • forof => for (const ${2:key} of ${1:object}) { ${3}}
  • forofo => for (const value of Object.values(${1:object}) { ${2}}

ts

  • tanf => (params:${1:string}) => ${2:void}
  • interface => interface ${2:I} {$1}
  • Record => Record<${1:string},$2>
  • tarray => ${1:string}[]

css/scss

  • dn => display: none;
  • fdc => flex-direction: column;
  • df => display: flex;
  • dn => display: none;
  • pa => position: absolute;
  • pr => position: relative;
  • pf => position: fixed;
  • ps => position: sticky;
  • m0a => margin: 0 auto;
  • tac => text-align: center;
  • tal => text-align: left;
  • tar => text-align: right;
  • vam => vertical-align: middle;
  • fl => float: left;
  • fr => float: right;
  • cb => clear: both;
  • oh => overflow: hidden;
  • bgn => background: none;
  • bdn => border: none;
  • fwb => font-weight: bold;
  • fwn => font-weight: normal;
  • fsi => font-style: italic;
  • curp => cursor: pointer;
  • lh1 => line-height: 1;
  • w100 => width: 100%;
  • h100 => height: 100%;
  • maw100 => max-width: 100%;
  • miw100 => min-width: 100%;
  • mah100 => max-height: 100%;
  • mih100 => min-height: 100%;
  • p0 => padding: 0;
  • m0 => margin: 0;
  • bd0 => border: 0;
  • bsb => box-sizing: border-box;
  • bsc => box-sizing: content-box;
  • wsn => white-space: nowrap;
  • toe => text-overflow: ellipsis;
  • usn => user-select: none;
  • pen => pointer-events: none;
  • vh => visibility: hidden;
  • vv => visibility: visible;
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft