{"id":26368763,"url":"https://github.com/bindreams/auto-snippets","last_synced_at":"2025-03-16T22:48:59.755Z","repository":{"id":52606488,"uuid":"521040887","full_name":"bindreams/auto-snippets","owner":"bindreams","description":"Insert text or run a command when a file of a particular type is created, or an empty file is opened.","archived":false,"fork":false,"pushed_at":"2025-03-07T15:30:50.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T16:29:22.593Z","etag":null,"topics":["snippets","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bindreams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-03T21:44:04.000Z","updated_at":"2025-03-07T15:30:55.000Z","dependencies_parsed_at":"2023-01-20T00:57:16.301Z","dependency_job_id":null,"html_url":"https://github.com/bindreams/auto-snippets","commit_stats":null,"previous_names":["bindreams/auto-snippets"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bindreams%2Fauto-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bindreams%2Fauto-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bindreams%2Fauto-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bindreams%2Fauto-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bindreams","download_url":"https://codeload.github.com/bindreams/auto-snippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945479,"owners_count":20372894,"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":["snippets","vscode","vscode-extension"],"created_at":"2025-03-16T22:48:59.346Z","updated_at":"2025-03-16T22:48:59.734Z","avatar_url":"https://github.com/bindreams.png","language":"TypeScript","readme":"# Auto Snippets\nInsert text or run a command when a file of a particular type is created, or an empty file is opened. Insert template classes, `#pragma once` statements or include guards, copyright comments, etc.\n\n## Installation\nOpen the Command Palette (Ctrl+P), then type in the following command:\n```\next install andreasxp.auto-snippets\n```\nAlternatively, install the extension directly from is [marketplace page](https://marketplace.visualstudio.com/items?itemName=andreasxp.auto-snippets).\n\n## Why not [`gruntfuggly.auto-snippet`](https://github.com/Gruntfuggly/auto-snippet)?\nThis extension is a clone of `gruntfuggly.auto-snippet` in almost every way. The differences are:\n- This extension loads in ~14ms, while gruntfuggly's takes ~140ms;\n- This extension runs inserts all snippets matched by a file, not just the first one. This allows for complex chains of snippets.\n\n## Configuration\n`auto-snippets.snippets` is an array of objects, each describing what should be inserted and for which files. These objects are:\n- `pattern`: A shell glob pattern that should match the file path, supporting `*`, `**` for nested directories, and `{x,y}` for sets of possible values;\n- `regex`: A regex pattern that should match the file path;\n- `language`: A VS Code languange id (such as `typescript`) that the file should match;\n- `snippet`: which snippet should be inserted;\n- `commands`: which VS Code commands should run.  \n  *Note: The commands are not executed synchronously. If no snippet is configured, the commands are still run.*\n\nExample:\n```json\n\"auto-snippets.snippets\": [\n    { \"pattern\": \"**/ut-*.cpp\", \"snippet\": \"ut-template\" },\n    { \"pattern\": \"**/*.h\",      \"snippet\": \"header-template\" },\n    { \"pattern\": \"**/*.cpp\",    \"snippet\": \"body-template\" },\n    { \"language\": \"javascript\", \"snippet\": \"template\", \"commands\": [\"editor.action.commentLine\"] }\n]\n```\nThe patterns are matched in order of definition. All matched patterns will be run, not just the first one.\n\nAuto Snippets takes snippets from your user snippets. You can add new snippets by visiting *File \u003e Preferences \u003e Configure User Snippets*. [More information on VS Code snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets).\n\n## Credits\nThis extension borrows almost all of the code from [Gruntfuggly's \"Auto Snippet\"](https://github.com/Gruntfuggly/auto-snippet).\n\nIcon made by [Freepik](https://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/), and modified by the author.\n\n## License\nThis project is licensed under the GNU General Public License v3.0. See the [license file](/LICENSE.txt) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbindreams%2Fauto-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbindreams%2Fauto-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbindreams%2Fauto-snippets/lists"}