Skip to content

Offline Code Snippet Sharing

Last updated on May 6, 2020

Guys, As said from the previous blog post that Sharing Code Snippet Without Publishing an extension in VS Code, I write the same in this blog post.

Introduction

You might have gone through the previous blog post on Creating VS Code Extensionfor sharing code snippet publicly.

Probably, you wanted to share the code snippet among your peers but not in the form of extension. In this post, you will learn that way easily.

Sharing Code Snippet Without Publishing

In order to create code snippet, you will have to follow two things,

1. Open Command Window (Ctrl+Shift+P)

Just type snippetsin the search input box, you will get like below

Offline Code Snippet Sharing
Configure User Snippets

2. Create JavaScript JSON snippet

Once chosen User Snippetsoption from the above step, then select JavaScript JSON snippetoption.

Offline Code Snippet Sharing
JavaScript JSON Code Snippet

You can use Snippet Generator to get easily created code snippet and then paste it here what you created. Save it.

There You GO. Try this snippet by creating a new file,

Offline Code Snippet Sharing
Created User Snippet

Published inJavaScript