VS Code YS Snippets
This extension for Visual Studio Code adds snippets for easy templates in HTML, CSS ,TypeScript and JavaScript.
See the CHANGELOG for the latest changes
Usage
Type "ys-" for generating optional snippets, press enter , and the snippet unfolds.
Alternatively, press Ctrl +Space (Windows, Linux) or Cmd +Space (macOS) to activate snippets from within the editor.
JavaScript+TypeScript Snippets
Snippet |
Purpose |
ys-import |
import template |
ys-arrowFunction |
arrow function |
ys-class-js |
generate JS class |
ys-class-ts |
generate TS class |
ys-random-number |
random number |
ys-asyn-callback |
asynchronously remote demo GET request using callback |
ys-asyn-callback-use |
Calling callback |
ys-asyn-promise |
asynchronously remote demo GET request using promise |
ys-asyn-promise-use |
Calling promise |
ys-asyn-obsrvable |
synchronously remote demo GET request |
ys-asyn-obsrvable-use |
Calling observable |
ys-arr-map |
array.map() |
ys-arr-filter |
array.filter() |
ys-arr-reduce |
array.reduce() |
HTML Snippets
Snippet |
Purpose |
ys-hello |
Hello World |
CSS Snippets
Snippet |
Purpose |
ys-flex-center |
display flex center |
ys-mediaQuery |
media queries |
React.js Snippets
Snippet |
Purpose |
ys-updateState |
update 1 object in state (React) |
Angular Snippets
Snippet |
Purpose |
ys-ng-if-else |
Angular ng-if-else template |
Installation
- Install Visual Studio Code 1.41 or higher
- Launch Code
- From the command palette
Ctrl -Shift -P (Windows, Linux) or Cmd -Shift -P (OSX)
- Select
Install Extension
- Choose the extension
- Reload Visual Studio Code
| |