Skip to content

Ever struggled with VSCode snippet libraries? SSnippets offers easily customizable snippets without any unnecessary complexity

Notifications You must be signed in to change notification settings

Hi-Im-Simon/SSnippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

SSnippets

Content

  • About – why and how?
  • Quickstart – how to integrate SSnippets into your project.
  • Customization – how to customize SSnippets to your needs.
  • Account sync – how to sync SSnippets across multiple projects and devices.

About

SSnippets offers easily customizable snippets without unnecessary complexity.

Take whatever you need, paste it into your project and stop slowing VSCode down with hundreds of snippets you'll never use, from libraries you'll forget you even installed.

The project was created to:

  • Maintain a repository of snippets that can be split into parts and fully customized to your project's needs.
  • Make it easier to take your first steps in VSCode snippet creation.

Quickstart

To enable SSnippets simply copy files with types of snippets that you need to the .vscode directory of your project.

Customization

Since SSnippets is not a library, it is extremely easy to customize.

Simply open a .code-snippets file containing a snippet that you want to customize and adjust its properties to your needs.

What do all these properties mean? The important ones you should focus on are:

  • "prefix" – what you have to write in your editor for the snippet suggestion to appear (e.g. if you type ssref, VSCode will most likely suggest a snippet with name ss-useRef).
  • "body" – content of the snippet. This is where the magic happens (you can find more about snippet syntax here).
  • "scope" – what kind of files should the snippets be suggested in (e.g. "javascript,html" will cause the snippet to be suggested in .js and .html files).

Account-sync

To sync SSnippets across multiple projects and devices using the same account you first need to have your VSCode settings sync turned on.

Then:

  • Press ctrl+shift+p.
  • Look for an option Snippets: Configure snippets and select it.
  • Select a file type that you want to use the snippets for (eg. typescriptreact to enable snippets only in .tsx files).
  • Paste selected SSnippets to the JSON file and save it.

About

Ever struggled with VSCode snippet libraries? SSnippets offers easily customizable snippets without any unnecessary complexity

Topics

Resources

Stars

Watchers

Forks