diff --git a/CHANGELOG.md b/CHANGELOG.md
index a73a2d9..3bdf42e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,15 @@
# Change Log
+### 4.1.0
+
+- [[#113](https://github.com/tahabasri/snippets/pull/113)] Added folder coloring with optional cascade to child folders.
+- [[#137](https://github.com/tahabasri/snippets/pull/137)]
+ - Redesigned the snippet editor into a two-panel layout.
+ - Fixed snippet edits randomly not saving.
+- [[#138](https://github.com/tahabasri/snippets/pull/138)] Fixed snippet IntelliSense missing in remote (SSH) sessions.
+- [[#136](https://github.com/tahabasri/snippets/pull/136)] Added setting to open folders collapsed by default.
+- [[#135](https://github.com/tahabasri/snippets/pull/135)] Surfaced language-less Snippets as Global in IntelliSense.
+- [[#134](https://github.com/tahabasri/snippets/pull/134)] Added support for importing snippets into a dedicated folder (without overwriting).
+
### 4.0.0
- [[#116](https://github.com/tahabasri/snippets/pull/116)]
diff --git a/README.md b/README.md
index 78ba9ae..442950e 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,11 @@
-
-
-
-
-
-
-
+[](https://marketplace.visualstudio.com/items?itemName=tahabasri.snippets)
+[](https://open-vsx.org/extension/tahabasri/snippets)
+[](https://marketplace.visualstudio.com/items?itemName=tahabasri.snippets)
+[](https://marketplace.visualstudio.com/items?itemName=tahabasri.snippets)
+[](https://marketplace.visualstudio.com/items?itemName=tahabasri.snippets&ssr=false#review-details)
+[](https://github.com/tahabasri/snippets/stargazers)
+[](https://github.com/tahabasri/snippets/actions/workflows/unit-tests.yml)
+
# Snippets — Supercharge Snippets in VS Code and Cursor
@@ -21,7 +22,7 @@ Install **Snippets** by one of the following options:
---
-[Features](#features) | [FAQ](#faq) | [Known Issues](#known-issues) | [Release Notes](#release-notes) | [Feedback](#feedback) | [Credits](#credits)
+[Features](#features) | [Settings](#settings) | [FAQ](#faq) | [Known Issues](#known-issues) | [Release Notes](#release-notes) | [Feedback](#feedback) | [Credits](#credits)
## Features
@@ -34,35 +35,48 @@ Boost your productivity with a set of powerful features that enhance snippet man
- [Customize](#customize) — Personalize your Snippets to match your style.
- [Sync](#sync) — Various options for synchronizing your snippets across multiple devices and users.
- [Boost](#boost) — Supercharge your snippets to make them more developer-friendly.
-- [AI Integration](#ai-integration) — Seamlessly work with AI assistants in VS Code.
+- [AI Integration](#ai-integration) — Seamlessly work with AI assistants in VS Code and Cursor.
+
+---
## Create
### Create Snippet from open editor
+Select 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 clipboard
+Turn whatever you last copied into a Snippet without selecting anything in the editor, straight from your clipboard.
+
### Create Snippet manually
+Create an empty Snippet and type its content yourself — handy when the code isn't already in your editor or clipboard.
+
+---
## Open
### Open Snippet with a single click
+Click a Snippet in the Snippets view to insert its content at the cursor in the active editor.
+
### Drop Snippet directly into the editor
+Drag a Snippet from the Snippets view and drop it exactly where you want it in the editor.
+
> You may need to hold `Shift` key while dragging to correctly drop the item in the editor.
### Copy Snippet to Clipboard
+Copy a Snippet's content to the clipboard to paste it wherever you need, inside or outside the editor.
+
### Insert Snippet directly into Terminal
+Send a Snippet straight to the integrated terminal instead of the editor — useful for commands you run often.
+
+> Enable `snippets.runCommandInTerminal` to have the inserted command executed automatically in the terminal.
+
+---
+
## Search
### Use IntelliSense to quickly access all your Snippets
-> You can set a special key to trigger IntelliSense from the extension settings. Default key is `>`. More about **IntelliSense** [here](https://code.visualstudio.com/docs/editor/intellisense).
+Your Snippets appear as IntelliSense suggestions while you type, so you can insert them without leaving the keyboard.
+
+> Suggestions are toggled with `snippets.showSuggestions` and triggered by the `snippets.triggerKey` character (default `>`). Labels are camel-cased in suggestions when `snippets.camelize` is enabled. More about **IntelliSense** [here](https://code.visualstudio.com/docs/editor/intellisense).
### Search for Snippets using Command Palette
+Fuzzy-search all your Snippets by name from the Command Palette and open the one you need.
+
@@ -99,47 +125,75 @@ alt="Native Search">
### Preview Snippets before insertion
+Hover a suggestion to preview the Snippet's content before inserting it, so you always pick the right one.
+
+---
+
## Manage
### Drag and drop Snippets from one folder to another
+Reorganize your library by dragging Snippets and folders into any folder in the tree.
+
### Reorder Snippets using Up and Down actions
+Move 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 Snippets
+Sort a single folder or your whole library alphabetically in one click when you'd rather not order items by hand.
+
### Action Buttons
-The extension now features enhanced action buttons throughout the interface for improved usability, making it easier to perform common operations with fewer clicks.
+The extension features enhanced action buttons throughout the interface for improved usability, making it easier to perform common operations with fewer clicks.
-> When Action Buttons are enabled, they become the primary method for interacting with Snippets in the Tree view, replacing the default click behavior.
+> When Action Buttons are enabled, they become the primary method for interacting with Snippets in the Tree view, replacing the default click behavior. Set `snippets.openButton` to open a Snippet in the editor/terminal from the action buttons instead of by clicking its name.
+---
+
## Customize
+
### Set icons for your folders
+Assign an icon to a folder from the **Edit Folder** screen to recognize it at a glance in the tree.
+
### Color your folders
-> Give 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. Set `snippets.disableFolderColorCascade` to limit the color to the folder and the items directly inside it instead.
+Give 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.
+
+> Set `snippets.disableFolderColorCascade` to limit the color to the folder and the items directly inside it instead.
+
+
+
+### Open folders collapsed by default
+
+Folders 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.
+
+> Enable `snippets.collapseFolders` to turn this on. This change requires a window restart.
### Add a description to your Snippet
+Add a free-text description to a Snippet to remind yourself what it does and when to use it.
+
> Descriptions show when hovering on top of a Snippet and in IntelliSense.
### Add a prefix to your Snippet
-> 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.
+Give a Snippet a short custom prefix to use as its IntelliSense shortcut instead of its full label.
+
+> When displaying Snippets using IntelliSense, the custom prefix will be used instead of the original Snippet label. A prefix is a recommended shortcut for Snippets with long labels.
### Prefix all your Snippets
-You can set a prefix for all your snippets to distinguish them from other VS Code and Cursor snippets.
-- set a keyword for the setting `Snippets: Global Prefix` e.g `snipp`
-- suggestions coming from your custom Snippets will be prefixed in IntelliSense
+Set a single global prefix for every Snippet to distinguish them from other VS Code and Cursor snippets in IntelliSense.
+
+- set a keyword for the setting `snippets.globalPrefix` (e.g `snipp`)
+- suggestions coming from your custom Snippets will be prefixed in IntelliSense
-> An [explicit prefix](#add-a-prefix-to-your-snippet) in a single Snippet will override Global Prefix settings.
+> An [explicit prefix](#add-a-prefix-to-your-snippet) on a single Snippet overrides the Global Prefix setting.
>
> 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`.
+### Redesigned snippet editor
+
+The 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.
+
+> Enable `snippets.expertMode` to always show the advanced options by default when editing a Snippet.
+
+
+
+---
## Sync
### Import and Export Snippets using JSON files
+Back up your whole library to a JSON file and import it back on another machine, or share it with teammates.
+
+> Two import modes are available: **Import data** replaces all your global snippets with the imported ones (a backup is kept for rollback), while **Import Snippets into New Folder** adds the imported snippets under a dedicated `Imported Snippets` folder without overwriting anything you already have.
+
-### Import VS Code Snippets to Cursor or Windsurf
+### Import VS Code Snippets to Cursor or Devin AI (aka Windsurf)
-You can import your existing VS Code snippets directly to Cursor or Windsurf combining the best snippets you collected for both editors.
+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 devices
-> **⚠ Experimental feature:** feel free to [file a bug](https://github.com/tahabasri/snippets/issues/new?labels=bug) as this is still an experimental change.
+Starting 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.
-Starting 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.
+> **⚠ Experimental feature:** feel free to [file a bug](https://github.com/tahabasri/snippets/issues/new?labels=bug) as this is still an experimental change.
-Check the [docs](https://code.visualstudio.com/docs/editor/settings-sync) to know more about **Settings Sync** feature and how to use it.
+Check the [docs](https://code.visualstudio.com/docs/editor/settings-sync) to know more about the **Settings Sync** feature and how to use it.
### Sync your Snippets with a Version Control System
A 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).
-> 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.
+> 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 VCS.
+---
## Boost
### Bind Snippets to Programming Languages
-Snippets 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.
+Snippets 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.
-> A Snippet bound to a programming language will get an icon for that particular language natively.
+> A Snippet bound to a programming language gets an icon for that particular language natively.
@@ -216,13 +288,17 @@ Snippets saved without a language scope are **global**: they appear in IntelliSe
### Resolve Snippet Syntax
+Snippets can contain VS Code snippet syntax (tab stops, placeholders, variables) that is resolved on insertion instead of being pasted literally.
+
> Learn more about the Snippet syntax [here](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax).
>
-> Option to **Resolve Snippet Syntax** is disabled by default for new Snippets, you may need to edit the Snippet to enable it.
+> The **Resolve Snippet Syntax** option is disabled by default for new Snippets — you may need to edit the Snippet to enable it.
+---
+
## AI Integration
Seamlessly integrate your snippets with AI assistants in VS Code and Cursor:
@@ -236,7 +312,7 @@ Use your snippets directly with GitHub Copilot Chat for enhanced productivity an
-- Use code snippets directly in Github Copilot
+- Use code snippets directly in Github Copilot.
@@ -257,6 +333,30 @@ alt="Use Snippets with Gemini Code Assist">
**Enjoy!**
+---
+
+## Settings
+
+All settings are exposed under the `Snippets` section of VS Code Settings (`Ctrl`/`Cmd` + `,`). Settings noted as requiring a window restart take effect only after reloading the window.
+
+| Setting | Default | Description |
+| --- | --- | --- |
+| `snippets.useWorkspaceFolder` | `false` | Save snippets to a `.vscode/snippets.json` file in the current workspace instead of (or in addition to) the global store. See [Sync with a VCS](#sync-your-snippets-with-a-version-control-system). |
+| `snippets.showSuggestions` | `true` | Show Snippets as IntelliSense suggestions while typing. |
+| `snippets.triggerKey` | `>` | Single character typed to trigger Snippets suggestions. *Requires a window restart.* |
+| `snippets.globalPrefix` | *(empty)* | Default prefix applied to Snippets that have no explicit prefix; they are suggested as `prefix:snippetName` (max 5 characters). *Requires a window restart.* |
+| `snippets.confirmBeforeDeletion` | `true` | Ask for confirmation before deleting a Snippet or folder. |
+| `snippets.runCommandInTerminal` | `false` | Automatically execute a Snippet in the terminal when it is opened there. |
+| `snippets.camelize` | `true` | Camel-case Snippet labels in suggestions (`awesome-and-cool snippet` → `awesomeAndCoolSnippet`). |
+| `snippets.expertMode` | `false` | Show the advanced options by default when editing a Snippet. |
+| `snippets.openButton` | `false` | Use the action buttons to open a Snippet in the editor/terminal, disabling open-on-name-click. |
+| `snippets.collapseFolders` | `false` | Open folders collapsed, expanding one level at a time. *Requires a window restart.* |
+| `snippets.disableFolderColorCascade` | `false` | Limit a folder's color to the folder and the items directly inside it, instead of cascading to all nested descendants. |
+
+> `snippets.snippetsLocation` is **deprecated**. The default storage is now VS Code `globalState` (which syncs across machines); use `snippets.useWorkspaceFolder` for file-based, project-scoped storage instead.
+
+---
+
## FAQ
### Q: Is there a limit on the number of snippets/folders I can create?
@@ -272,10 +372,10 @@ alt="Use Snippets with Gemini Code Assist">
**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).**
### Q: How do I use snippets with AI assistants?
-**A: The extension now integrates with GitHub Copilot Chat, Cursor Pane, and Gemini Code Assist. Check the [AI Integration](#ai-integration) section for details.**
+**A: The extension integrates with GitHub Copilot Chat, Cursor Pane, and Gemini Code Assist. Check the [AI Integration](#ai-integration) section for details.**
-### Q: I'm switching to Cursor/Windsurf. How do I import my existing VS Code snippets?
-**A: You can import your VS Code snippets directly to Cursor/Windsurf using the import feature. See the [Import VS Code Snippets to Cursor Position](#import-vs-code-snippets-to-cursor-or-windsurf) section.**
+### 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](#import-vs-code-snippets-to-cursor-or-devin-ai-aka-windsurf) section.**
## Known Issues
diff --git a/images/features/070-folder-colors.png b/images/features/070-folder-colors.png
new file mode 100644
index 0000000..76fd111
Binary files /dev/null and b/images/features/070-folder-colors.png differ
diff --git a/images/features/071-snippet-editor.gif.png b/images/features/071-snippet-editor.gif.png
new file mode 100644
index 0000000..ab9434e
Binary files /dev/null and b/images/features/071-snippet-editor.gif.png differ
diff --git a/images/logo/logo.png b/images/logo/logo.png
index c5cc3d8..164c74d 100644
Binary files a/images/logo/logo.png and b/images/logo/logo.png differ
diff --git a/images/logo/logo.svg b/images/logo/logo.svg
index 8ab323c..e8d5be3 100644
--- a/images/logo/logo.svg
+++ b/images/logo/logo.svg
@@ -1,2 +1,3 @@
-
-
+
diff --git a/package.json b/package.json
index 881e274..f1c46dd 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "snippets",
"displayName": "Snippets",
"description": "Supercharge your Snippets in VS Code — Manage your code snippets & AI prompts without quitting your editor.",
- "version": "4.0.0",
+ "version": "4.1.0",
"preview": false,
"license": "SEE LICENSE IN LICENSE.txt",
"publisher": "tahabasri",
@@ -40,10 +40,6 @@
"Code Block",
"IntelliSense"
],
- "galleryBanner": {
- "color": "#ffc107",
- "theme": "dark"
- },
"activationEvents": [
"onStartupFinished"
],
@@ -62,7 +58,7 @@
},
{
"view": "snippetsExplorer",
- "contents": "In order to use snippets, save some code here.\n[Add Snippet](command:globalSnippetsCmd.addSnippet)\n[Add Snippet Folder](command:globalSnippetsCmd.addSnippetFolder)\n[Import Snippets](command:globalSnippetsCmd.importSnippets)\nTo import Snippets from VS Code, you can export them from an open VS Code window, and then, use the Import Snippets command in Windsurf.\nTo learn more about how to use snippets [read the docs](https://github.com/tahabasri/snippets/blob/main/README.md#features).",
+ "contents": "In order to use snippets, save some code here.\n[Add Snippet](command:globalSnippetsCmd.addSnippet)\n[Add Snippet Folder](command:globalSnippetsCmd.addSnippetFolder)\n[Import Snippets](command:globalSnippetsCmd.importSnippets)\nTo import Snippets from VS Code, you can export them from an open VS Code window, and then, use the Import Snippets command in Devin AI (aka Windsurf).\nTo learn more about how to use snippets [read the docs](https://github.com/tahabasri/snippets/blob/main/README.md#features).",
"when": "snippets.host == windsurf"
},
{
@@ -155,12 +151,12 @@
},
{
"command": "globalSnippetsCmd.addToCursorAIPane",
- "title": "Add to Cursor AI Pane",
+ "title": "Add to Cursor Pane",
"category": "Snippets"
},
{
"command": "globalSnippetsCmd.addAsCodeSnippetToCursorAIPane",
- "title": "Add as Code Snippet to Cursor AI Pane",
+ "title": "Add as Code Snippet to Cursor Pane",
"category": "Snippets"
},
{
diff --git a/resources/icons/logo_w.svg b/resources/icons/logo_w.svg
index 2358e82..f21e8a7 100644
--- a/resources/icons/logo_w.svg
+++ b/resources/icons/logo_w.svg
@@ -1,2 +1,3 @@
-
-
+
diff --git a/src/extension.ts b/src/extension.ts
index 4d00f4e..296bd76 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -21,7 +21,7 @@ import { DecorationProvider } from './provider/decorationProvider';
*/
export function activate(context: vscode.ExtensionContext) {
// exact version for which show Changelog panel
- const changelogVersion = '4.0.0';
+ const changelogVersion = '4.1.0';
//** variables **//
// global settings