Snippets — Supercharge Snippets in VS Code and CursorCode 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. Visual Studio Code already provides robust support for snippets, including their appearance in IntelliSense, tab-completion, and a dedicated snippet picker ( Getting StartedInstall Snippets by one of the following options:
Features | Settings | FAQ | Known Issues | Release Notes | Feedback | Credits FeaturesBoost your productivity with a set of powerful features that enhance snippet management:
CreateCreate Snippet from open editorSelect code in any open editor and save it as a Snippet in a single action — the current selection becomes the Snippet value.
Create Snippet directly from the clipboardTurn whatever you last copied into a Snippet without selecting anything in the editor, straight from your clipboard.
Create Snippet manuallyCreate an empty Snippet and type its content yourself — handy when the code isn't already in your editor or clipboard.
OpenOpen Snippet with a single clickClick a Snippet in the Snippets view to insert its content at the cursor in the active editor.
Drop Snippet directly into the editorDrag a Snippet from the Snippets view and drop it exactly where you want it in the editor.
Copy Snippet to ClipboardCopy a Snippet's content to the clipboard to paste it wherever you need, inside or outside the editor.
Insert Snippet directly into TerminalSend a Snippet straight to the integrated terminal instead of the editor — useful for commands you run often.
SearchUse IntelliSense to quickly access all your SnippetsYour Snippets appear as IntelliSense suggestions while you type, so you can insert them without leaving the keyboard.
Search for Snippets using Command PaletteFuzzy-search all your Snippets by name from the Command Palette and open the one you need.
You can also search directly into the Snippets view similarly to the File Explorer.
Preview Snippets before insertionHover a suggestion to preview the Snippet's content before inserting it, so you always pick the right one.
ManageDrag and drop Snippets from one folder to anotherReorganize your library by dragging Snippets and folders into any folder in the tree.
Reorder Snippets using Up and Down actionsMove a Snippet or folder up or down within its parent to arrange items in the exact order you want.
Sort alphabetically a Snippets folder or all your SnippetsSort a single folder or your whole library alphabetically in one click when you'd rather not order items by hand.
Action ButtonsThe extension features enhanced action buttons throughout the interface for improved usability, making it easier to perform common operations with fewer clicks.
CustomizeSet icons for your foldersAssign an icon to a folder from the Edit Folder screen to recognize it at a glance in the tree.
Color your foldersGive a folder a color from the Edit Folder screen to make it stand out in the tree. By default the color cascades to the snippets and subfolders nested inside it.
Open folders collapsed by defaultFolders can open collapsed so the tree stays compact, expanding one level at a time as you drill in instead of revealing the whole subtree at once.
Add a description to your SnippetAdd a free-text description to a Snippet to remind yourself what it does and when to use it.
Add a prefix to your SnippetGive a Snippet a short custom prefix to use as its IntelliSense shortcut instead of its full label.
Prefix all your SnippetsSet a single global prefix for every Snippet to distinguish them from other VS Code and Cursor snippets in IntelliSense.
Redesigned snippet editorThe snippet editor uses a two-panel layout: the snippet value on one side and its properties (description, prefix, language, syntax resolving) on the other, making longer snippets easier to edit at a glance.
SyncImport and Export Snippets using JSON filesBack up your whole library to a JSON file and import it back on another machine, or share it with teammates.
Import VS Code Snippets to Cursor or Devin AI (aka Windsurf)You can import your existing VS Code snippets directly to Cursor or Devin AI (aka Windsurf), combining the best snippets you collected for both editors. Sync Snippets between multiple devicesStarting with version 2.0 and up, Snippets supports backup using the VS Code Settings Sync feature. Your snippets are saved alongside your VS Code data no matter your operating system.
Check the docs to know more about the Settings Sync feature and how to use it. Sync your Snippets with a Version Control SystemA 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
BoostBind Snippets to Programming LanguagesSnippets created from a language-specific editor/file keep a reference to the programming language used, and are suggested only in editors/files of the same programming language.
You can explicitly set a programming language by appending the language file extension to the Snippet name at the creation prompt.
Global SnippetsSnippets saved without a language scope are global: they appear in IntelliSense in every file, regardless of the active language. Pick
Resolve Snippet SyntaxSnippets can contain VS Code snippet syntax (tab stops, placeholders, variables) that is resolved on insertion instead of being pasted literally.
AI IntegrationSeamlessly integrate your snippets with AI assistants in VS Code and Cursor: GitHub Copilot ChatUse your snippets directly with GitHub Copilot Chat for enhanced productivity and context-aware code generation.
Cursor PaneIntegrate with Cursor's AI capabilities to get intelligent suggestions based on your snippets library.
Gemini Code AssistLeverage Google's Gemini Code Assist alongside your snippets for more powerful code completion and generation.
Enjoy! SettingsAll settings are exposed under the
FAQQ: Is there a limit on the number of snippets/folders I can create?A: There is no limit; your disk space is the only limitation. Q: I'm feeling overwhelmed by multiple snippets. How can I better organize them?A: Check the Manage section for available organizational features including folders, drag-and-drop, reordering, and alphabetical sorting. Q: Clicking "Request to Initialize File" does nothing. What should I do?A: If you're attempting to initialize the snippets file for a new workspace and nothing happens, ensure that the path to your current folder open in VS Code has the correct file permissions. Q: Can I specify the cursor position so that, when the snippet is added, the cursor is moved to a particular position?A: Yes, you can enable Q: How do I use snippets with AI assistants?A: The extension integrates with GitHub Copilot Chat, Cursor Pane, and Gemini Code Assist. Check the AI Integration section for details. Q: I'm switching to Cursor/Devin AI (aka Windsurf). How do I import my existing VS Code snippets?A: You can import your VS Code snippets directly to Cursor/Devin AI (aka Windsurf) using the import feature. See the Import VS Code Snippets to Cursor or Devin AI section. Known IssuesTroubleshoot Snippets
These 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.
Files Permissions on WindowsYou 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. Release NotesCheck the CHANGELOG for full release notes. FeedbackCredits |
































