This repository contains my personal Visual Studio Code Snippet JSON files. You are more than welcome to use these!
- Introduction
- Table of Contents
- Explanation
- What are snippets?
- What is this repository?
- Installation
- Usage
- Contribute
Snippets are pieces of code that you reuse often. While very subjective, they tend to be if statements, loops, listeners, classes, and many other things that are used often.
While snippets are used in various IDEs, VS Code is the focus for this repository.
VS Code uses JSON to store snippets. With everything being open source, there are many other snippet JSON files out in the wild too.
A collection of snippets created by me!
I plan to use it as a place to safely store and track my changes, while allowing others to benefit from it.
You can access your snippets by:
- Open the Command Pallette (
F1
orCTRL + P
and add>
). - Searching for "Preferences: Configure User Snippets"
- Select the language you want to modify/view the snippets for.
From here you can take whatever snippets you want from a file here or replace the VS Code file entirely.
Visual Studio Code will populate your intellisense. You can also invoke the intellisense prompt by using CTRL + SPACE
.
You can also go through the Command Pallette (F1
or CTRL + P
and add >
) and use "Insert Snippet", then selecting the snippet you want to insert.
NOTE
It's important to watch where your cursor is placed after inserting a snippet. VS Code gives you the ability to move the cursor to certain areas and tab through them linearly, I do my best to take full advantage of this feature here.
Don't. Feel free to create a fork though!