Jai Lakhmani on Tue Jul 19 2022
Visual Studio Code or vscode is Microsoft's most popular IDE(integrated
development environment). It was created on 29 April 2015 for the sole
purpose of Web development. But after sometimes it started supporting other
languages like Java, PHP, Python, C++, etc. It combines the simplicity of a
source code editor with powerful developer tooling, like IntelliSense code
completion and debugging.
If you are a coder you must have worked on vscode sooner or later.
Code snippets are templates that make it easier to enter repeating code
patterns, such as loops or conditional statements.VS Code has built-in snippets
for several languages such as JavaScript, TypeScript, Markdown, and PHP. But
for a coder, these snippets are not enough.
Creating a custom snippet is easy, just follow the given steps.
Here you can user \n and \t give next-line and
tab-space respectively. Here you can specify where to point your cursor
automatically when the snippet is called. Specify $1 to point your first
cursor, and $2 for the next cursor, and so on.
Now just write your snippet prefix in your file to see it in action