{"id":13596869,"url":"https://github.com/tahabasri/snippets","last_synced_at":"2025-04-09T06:10:09.981Z","repository":{"id":40253917,"uuid":"313789205","full_name":"tahabasri/snippets","owner":"tahabasri","description":"Supercharge your Snippets in VS Code — Manage your code snippets \u0026 AI prompts without quitting your editor.","archived":false,"fork":false,"pushed_at":"2025-03-24T18:17:34.000Z","size":10247,"stargazers_count":151,"open_issues_count":7,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T04:06:08.942Z","etag":null,"topics":["ai-prompts","organize-snippets","prompts","snippets","snippets-collection","snippets-manager","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=tahabasri.snippets","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tahabasri.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-18T01:28:49.000Z","updated_at":"2025-03-31T07:18:34.000Z","dependencies_parsed_at":"2025-03-17T04:46:02.515Z","dependency_job_id":null,"html_url":"https://github.com/tahabasri/snippets","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahabasri%2Fsnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahabasri%2Fsnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahabasri%2Fsnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahabasri%2Fsnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tahabasri","download_url":"https://codeload.github.com/tahabasri/snippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-prompts","organize-snippets","prompts","snippets","snippets-collection","snippets-manager","vscode","vscode-extension"],"created_at":"2024-08-01T16:02:53.147Z","updated_at":"2025-04-09T06:10:09.960Z","avatar_url":"https://github.com/tahabasri.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","vscode-extension"],"sub_categories":[],"readme":"![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/tahabasri.snippets.svg?style=flat-square)\n![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/tahabasri.snippets.svg?style=flat-square)\n![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/tahabasri.snippets.svg?style=flat-square)\n![Visual Studio Marketplace Rating](https://img.shields.io/visual-studio-marketplace/r/tahabasri.snippets.svg?style=flat-square)\n![GitHub Repo stars](https://img.shields.io/github/stars/tahabasri/snippets)\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/tahabasri/snippets/unit-tests.yml)\n![The MIT License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat-square)\n\n# Snippets — Supercharge Snippets in VS Code\n\nCode snippets are valuable additions for anyone looking to save time during development. They simplify the process of entering repetitive code, such as loops, complex HTML structures or reusable methods.\n\nVisual Studio Code already provides robust support for snippets, including their appearance in IntelliSense, tab-completion, and a dedicated snippet picker `(Insert Snippet in the Command Palette)`. This extension takes snippets to another level by introducing new features that enhance code snippet management.\n\n## Getting Started\n\nInstall **Snippets** by one of the following options:\n- clicking `Install` on the banner above\n- searching for `Snippets` from the Extensions side bar in VS Code\n- typing `ext install tahabasri.snippets` from the Command Palette in VS Code\n\n---\n\n[Features](#features) | [FAQ](#faq) | [Known Issues](#known-issues) | [Release Notes](#release-notes) | [Feedback](#feedback) | [Credits](#credits)\n\n## Features\n\nBoost your productivity with a set of powerful features that enhance snippet management:\n\n- [Create](#create) — Create Snippets easily with few clicks.\n- [Open](#open) — Open Snippets quickly from anywhere in VS Code.\n- [Search](#search) — Find your Snippet in 2 seconds, or less...\n- [Manage](#manage) — Organize your snippets freely, with no forced order, beyond editing and deleting.\n- [Customize](#customize) — Personalize your Snippets to match your style.\n- [Sync](#sync) — Various options for synchronizing your snippets across multiple devices and users.\n- [Boost](#boost) — Supercharge your snippets to make them more developer-friendly.\n\n## Create\n\n### Create Snippet from open editor\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/01-new-snippet.gif\" \nalt=\"Create Snippet\"\u003e\n\n### Create Snippet directly from the clipboard\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/02-new-snippet-clipboard.gif\" \nalt=\"Create Snippet from Clipboard\"\u003e\n\n### Create Snippet manually\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/03-new-snippet-manual.gif\" \nalt=\"Create Snippet Manually\"\u003e\n\n\n## Open\n\n### Open Snippet with a single click\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/05-open-snippet-click.gif\" \nalt=\"Open Snippet\"\u003e\n\n### Drop Snippet directly into the editor\n\n\u003e You may need to hold `Shift` key while dragging to correctly drop the item in the editor.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/063-drag-and-drop-into-editor.gif\" \nalt=\"Open Snippet\"\u003e\n\n### Copy Snippet to Clipboard\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/10-copy-to-clipboard.jpg\" \nalt=\"Copy Snippet to Clipboard\"\u003e\n\n### Insert Snippet directly into Terminal\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/08-open-snippet-terminal.gif\" \nalt=\"Open Snippet in Terminal\"\u003e\n\n## Search\n\n### Use IntelliSense to quickly access all your Snippets\n\n\u003e You can set a special key to trigger IntelliSense from the extension settings. Default key is `\u003e`. More about **IntelliSense** [here](https://code.visualstudio.com/docs/editor/intellisense).\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/051-open-snippet-suggestion.gif\" \nalt=\"Open Snippet using Suggestions\"\u003e\n\n### Search for Snippets using Command Palette\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/07-open-snippet-palette.gif\" \nalt=\"Open Snippets from Command Palette\"\u003e\n\nYou can also search directly into the Snippets view similarly to the File Explorer.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/11-native-search.jpg\" \nalt=\"Native Search\"\u003e\n\n### Preview Snippets before insertion\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/006-preview.gif\" \nalt=\"Preview Snippets\"\u003e\n\n## Manage\n\n### Drag and drop Snippets from one folder to another\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/056-drag-and-drop.gif\" \nalt=\"Drag and Drop Snippets\"\u003e\n\n### Reorder Snippets using Up and Down actions\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/04-snippets-reorder.gif\" \nalt=\"Reorder Snippets\"\u003e\n\n### Sort alphabetically a Snippets folder or all your Snippets\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/047-sort-snippets.gif\" \nalt=\"Reorder Snippets\"\u003e\n\n## Customize\n### Set icons for your folders\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/051-folder-icons.gif\" \nalt=\"Set Folder Icon\"\u003e\n\n### Add a description to your Snippet\n\n\u003e Descriptions show when hovering on top of a Snippet and in IntelliSense.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/064-description.gif\" \nalt=\"Set Snippet Description\"\u003e\n\n### Add a prefix to your Snippet\n\n\u003e When displaying Snippets using IntelliSense, custom prefix will be used instead of the original Snippet label. A prefix is a recommended shortcut for Snippets with long labels.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/042-prefix.gif\" \nalt=\"Set Snippet Prefix\"\u003e\n\n### Prefix all your Snippets\n\nYou can set a prefix for all your snippets to distinguish them from other VS Code snippets.\n- set a keyword for the setting `Snippets: Global Prefix` e.g `snipp`\n- suggestions coming from your custom Snippets will be prefixed in IntelliSense \n\n\u003e An [explicit prefix](#add-a-prefix-to-your-snippet) in a single Snippet will override Global Prefix settings.\n\u003e \n\u003e For example, if the global prefix in your settings is set to `foo`, and a custom snippet is explicitly prefixed with `boo`, the latter will be displayed in IntelliSense as `boo`. All other snippets with no explicit prefix will be displayed as `foo`.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/12-global-prefix.jpg\" \nalt=\"Global Prefix\"\u003e\n\n\n## Sync\n\n### Import and Export Snippets using JSON files\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/13-import-export.jpg\" \nalt=\"Import and Export Snippets\"\u003e\n\n### Sync Snippets between multiple devices\n\n\u003e **⚠ Experimental feature:** feel free to [file a bug](https://github.com/tahabasri/snippets/issues/new?labels=bug) as this is still an experimental change.\n\nStarting with version 2.0 and up, *Snippets* supports backup using **VS Code Settings Sync** feature. Your snippets will be saved alongside your VS Code data no matter your operating system.\n\nCheck the [docs](https://code.visualstudio.com/docs/editor/settings-sync) to know more about **Settings Sync** feature and how to use it.\n\n### Sync your Snippets with a Version Control System\n\nA large number of users utilize a VCS (e.g Git) and may need to associate a set of snippets with a specific project (e.g sharing project-specific snippets with team members). This can be achieved by enabling the `snippets.useWorkspaceFolder` setting. Once this option is enabled, the extension will read/write snippets to/from the `.vscode/snippets.json` file if it's available (the extension will prompt you to create the file the first time you enable this option).\n\n\u003e Note: Workspace snippets are excluded from synchronization via **Settings Sync**. You will be responsible for backing up the `.vscode/snippets.json` file using your favorite VSC.\n\n\n## Boost\n\n### Bind Snippets to Programming Languages\n\nSnippets created from a language specific editor/file will keep reference of the programming language used. The same Snippet will be suggested only in editors/files of same programming language.\n\n\u003e A Snippet bound to a programming language will get an icon for that particular language natively.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/038-language-scope.gif\" \nalt=\"Bind Snippets to Languages\"\u003e\n\nYou can explicitly set a programming language by appending the language file extension to the Snippet name at the creation prompt.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/038-language-scope-by-name.gif\" \nalt=\"Manually Bind Snippets to Languages\"\u003e\n\n### Resolve Snippet Syntax\n\n\u003e Learn more about the Snippet syntax [here](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax).\n\u003e \n\u003e Option to **Resolve Snippet Syntax** is disabled by default for new Snippets, you may need to edit the Snippet to enable it.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/features/06-open-intelligent-snippet.gif\" \nalt=\"Open Snippet with Variables\"\u003e\n\n**Enjoy!**\n\n## FAQ\n\n### Q: Is there a limit on the number of snippets/folders I can create?\n**A: There is no limit; your disk space is the only limitation.**\n\n### Q: I'm feeling overwhelmed by multiple snippets. How can I better organize them?\n**A: Check this [section](#manage) for available organizational features**\n\n### Q: Clicking \"Request to Initialize File\" does nothing. What should I do?\n**A: If you're attempting to initialize the snippets file for a new [workspace](#sync-your-snippets-with-a-version-control-system) and nothing happens, ensure that the path to your current folder open in VS Code has the correct file permissions.**\n\n### Q: Can I specify the cursor position so that, when the snippet is added, the cursor is moved to a particular position?\n**A: Yes, you can enable `Resolve Snippet Syntax` for a particular snippet and use [VS Code Tab Stops](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_tabstops).**\n\n## Known Issues\n\n### Troubleshoot Snippets\n\n- The new \"Troubleshoot Snippets\" option helps fix common issues, including:\n  - Old snippets not appearing.\n  - Moving snippets not working.\n  - New snippets disappearing.\n\nThese issues often arise when two conflicting features, moving snippets and syncing them simultaneously, are in use. Fortunately, no snippets should be permanently lost. They are all stored locally, but inconsistencies in the database can make the snippets temporarily invisible.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tahabasri/snippets/main/images/issues/068-troubleshoot-snippets.gif\" \nalt=\"Fix Snippets\"\u003e\n\n### Files Permissions on Windows\n\nYou may encounter some inconsistencies when dealing with snippets on Windows. The first thing to check is whether all related VS Code files are accessible and if any folder permissions are affecting accessibility.\n\n## Release Notes\n\nCheck the [CHANGELOG](CHANGELOG.md) for full release notes.\n\n## Feedback\n\n* [Request a feature](https://github.com/tahabasri/snippets/issues/new?labels=enhancement).\n* [File a bug](https://github.com/tahabasri/snippets/issues/new?labels=bug).\n\n### Credits\n\n- \u003cspan\u003eGitHub Repo Social Preview Background Photo by \u003ca href=\"https://unsplash.com/@jjying?utm_source=unsplash\u0026amp;utm_medium=referral\u0026amp;utm_content=creditCopyText\"\u003eJJ Ying\u003c/a\u003e on \u003ca href=\"https://unsplash.com/?utm_source=unsplash\u0026amp;utm_medium=referral\u0026amp;utm_content=creditCopyText\"\u003eUnsplash\u003c/a\u003e\u003c/span\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahabasri%2Fsnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftahabasri%2Fsnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahabasri%2Fsnippets/lists"}