You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We sometimes write the same code multiple times. For example Configs (related to webpack bable, prettier, eslint etc), frequently used react component code and other boiler plate code.
Some of us store them in GitHub's Gists, but have to copy paste it when required. Snippets are handy shortcuts to generate code for us. For example if you type imp in VS Code's JavaScript file, it automatically creates import <some space> from '<cursor shows here>'. You can type the package name and then press tab to automatically move cursor to another step. Just try it yourself.
We can create our own custom snippets for frequently written code to increase productivity. However writing it is painful. So here is a handy tool that creates snippet for you.
This tool works for sublime, atom and VS Code. However I like VS Code so this one is mostly about it.
Just copy paste your code on left side. Add $1 for first tab, $2 for second tab and so on.
On the right side you will see snippets generated automatically for you.
After that Go to 'Preferences' > 'User snippets' and select the correct type, then paste in the copied code.
Discover more from the VS Code snippets docs.
The text was updated successfully, but these errors were encountered:
We sometimes write the same code multiple times. For example Configs (related to webpack bable, prettier, eslint etc), frequently used react component code and other boiler plate code.
Some of us store them in GitHub's Gists, but have to copy paste it when required. Snippets are handy shortcuts to generate code for us. For example if you type
imp
in VS Code's JavaScript file, it automatically createsimport <some space> from '<cursor shows here>'
. You can type the package name and then press tab to automatically move cursor to another step. Just try it yourself.We can create our own custom snippets for frequently written code to increase productivity. However writing it is painful. So here is a handy tool that creates snippet for you.
This tool works for sublime, atom and VS Code. However I like VS Code so this one is mostly about it.
https://snippet-generator.app/
Just copy paste your code on left side. Add $1 for first tab, $2 for second tab and so on.
On the right side you will see snippets generated automatically for you.
After that Go to 'Preferences' > 'User snippets' and select the correct type, then paste in the copied code.
Discover more from the VS Code snippets docs.
The text was updated successfully, but these errors were encountered: