{"_id":"@builtbygio/snippets","_rev":"2-833aeab3d207e496efc0d5d4d38cbc2c","name":"@builtbygio/snippets","dist-tags":{"latest":"1.5.6"},"versions":{"1.5.5":{"name":"@builtbygio/snippets","version":"1.5.5","license":"MIT","_id":"@builtbygio/snippets@1.5.5","maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"homepage":"https://github.com/builtbygio/snippets#readme","bugs":{"url":"https://github.com/builtbygio/snippets/issues"},"dist":{"shasum":"40579db153ac7ef543ce731857290a13a00cea0f","tarball":"https://registry.npmjs.org/@builtbygio/snippets/-/snippets-1.5.5.tgz","fileCount":29,"integrity":"sha512-863MBio/ZrKI3hd1Kl60Tu9GMf5vDyiGFAaa9Hhkl5TQMuPAz98kvN1g5np9bXAeXJwaiHZDNfdFDZ22JqM17Q==","signatures":[{"sig":"MEUCIEr0jS/CTAl+LyVlhSczU5NY2RzTlKZQ+7X8zfwvJwufAiEAuEVK+HD05Jh/66aXIgS4ilc5fdm7dkn71DxdR/whr7g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60769},"main":"./lib/snippets","engines":{"atom":"*","chevron":"*"},"_npmUser":{"name":"giobuilds","email":"giova19@proton.me"},"repository":{"url":"git+https://github.com/builtbygio/snippets.git","type":"git"},"_npmVersion":"11.16.0","description":"Expand snippets matching the current prefix with `tab`.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"temp":"~0.8.0","async":"~0.2.6","pegjs":"~0.8.0","season":"^6.0.2","fs-plus":"^3.0.0","loophole":"^1","underscore-plus":"^1.0.0","atom-select-list":"^0.7.0","scoped-property-store":"^0.17.0"},"_hasShrinkwrap":false,"providedServices":{"snippets":{"versions":{"0.1.0":"provideSnippets"},"description":"Snippets are text shortcuts that can be expanded to their definition."}},"_npmOperationalInternal":{"tmp":"tmp/snippets_1.5.5_1787781290423_0.908298236871605","host":"s3://npm-registry-packages-npm-production"}},"1.5.6":{"name":"@builtbygio/snippets","version":"1.5.6","main":"./lib/snippets","description":"Expand snippets matching the current prefix with `tab`.","repository":{"type":"git","url":"git+https://github.com/builtbygio/snippets.git"},"license":"MIT","engines":{"atom":"*","chevron":"*"},"dependencies":{"async":"~0.2.6","atom-select-list":"^0.7.0","fs-plus":"^3.0.0","loophole":"^1","pegjs":"~0.8.0","scoped-property-store":"^0.17.0","season":"^6.0.2","temp":"~0.8.0","underscore-plus":"^1.0.0"},"providedServices":{"snippets":{"description":"Snippets are text shortcuts that can be expanded to their definition.","versions":{"0.1.0":"provideSnippets"}}},"gitHead":"3486ae73c4a7b186001bcb1fa73b280a2e81ed39","_id":"@builtbygio/snippets@1.5.6","bugs":{"url":"https://github.com/builtbygio/snippets/issues"},"homepage":"https://github.com/builtbygio/snippets#readme","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-fayt21A1qZrFiOH8UplDcDfnIB1+2K1fhZZ332OuSxNeT3g1GjcgfZk8OQpuCUyvI8Ii9zdYIzIno+raPHtDRQ==","shasum":"6571358399eaa0efaf21cafcbd9cf7ee7150d206","tarball":"https://registry.npmjs.org/@builtbygio/snippets/-/snippets-1.5.6.tgz","fileCount":29,"unpackedSize":60772,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICMlUmafqrOHMNZF2rjPzFmywRhN7ontfD8dCXT1jIivAiEAzxgqAypkUiOFbfkRj5eXGH5agD6q4Y5LK9jtowjds5Q="}]},"_npmUser":{"name":"giobuilds","email":"giova19@proton.me"},"directories":{},"maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/snippets_1.5.6_1787882148773_0.0741612596000254"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T21:54:50.300Z","modified":"2026-08-28T01:55:49.108Z","1.5.5":"2026-08-26T21:54:50.559Z","1.5.6":"2026-08-28T01:55:48.916Z"},"bugs":{"url":"https://github.com/builtbygio/snippets/issues"},"license":"MIT","homepage":"https://github.com/builtbygio/snippets#readme","repository":{"type":"git","url":"git+https://github.com/builtbygio/snippets.git"},"description":"Expand snippets matching the current prefix with `tab`.","maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"readme":"# Snippets package\n[![macOS Build Status](https://travis-ci.org/atom/snippets.svg?branch=master)](https://travis-ci.org/atom/snippets) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/8hlc0onofkgbxw53/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/snippets/branch/master) [![Dependency Status](https://david-dm.org/atom/snippets.svg)](https://david-dm.org/atom/snippets)\n\nExpand snippets matching the current prefix with <kbd>tab</kbd> in Atom.\n\nTo add your own snippets, select the _Atom > Snippets..._ menu option if you're using macOS, or the _File > Snippets..._ menu option if you're using Windows, or the _Edit > Snippets..._ menu option if you are using Linux.\n\n## Snippet Format\n\nSnippets files are stored in a package's `snippets/` folder and also loaded from `~/.atom/snippets.cson`. They can be either `.json` or `.cson` file types.\n\n```coffee\n'.source.js':\n  'console.log':\n    'prefix': 'log'\n    'body': 'console.log(${1:\"crash\"});$2'\n```\n\nThe outermost keys are the selectors where these snippets should be active, prefixed with a period (`.`) (details below).\n\nThe next level of keys are the snippet names.\n\nUnder each snippet name is a `prefix` that should trigger the snippet and a `body` to insert when the snippet is triggered.\n\n`$` followed by a number are the tabs stops which can be cycled between by pressing <kbd>tab</kbd> once a snippet has been triggered.\n\nThe above example adds a `log` snippet to JavaScript files that would expand to.\n\n```js\nconsole.log(\"crash\");\n```\n\nThe string `\"crash\"` would be initially selected and pressing tab again would place the cursor after the `;`\n\n### Optional parameters\nThese parameters are meant to provide extra information about your snippet to [autocomplete-plus](https://github.com/atom/autocomplete-plus/wiki/Provider-API).\n\n* `leftLabel` will add text to the left part of the autocomplete results box.\n* `leftLabelHTML` will overwrite what's in `leftLabel` and allow you to use a bit of CSS such as `color`.\n* `rightLabelHTML`. By default, in the right part of the results box you will see the name of the snippet. When using `rightLabelHTML` the name of the snippet will no longer be displayed, and you will be able to use a bit of CSS.\n* `description` will add text to a description box under the autocomplete results list.\n* `descriptionMoreURL` URL to the documentation of the snippet.\n\n![autocomplete-description](http://i.imgur.com/cvI2lOq.png)\n\nExample:\n```coffee\n'.source.js':\n  'console.log':\n    'prefix': 'log'\n    'body': 'console.log(${1:\"crash\"});$2'\n    'description': 'Output data to the console'\n    'rightLabelHTML': '<span style=\"color:#ff0\">JS</span>'\n```\n\n### Determining the correct scope for a snippet\n\nThe outmost key of a snippet is the \"scope\" that you want the descendent snippets to be available in. The key should be prefixed with a period (`text.html.basic` => `.text.html.basic`). You can find out the correct scope by opening the Settings (<kbd>cmd-,</kbd> on macOS) and selecting the corresponding *Language [xxx]* package, e.g. for *Language Html*:\n\n![Screenshot of Language Html settings](https://cloud.githubusercontent.com/assets/1038121/5137632/126beb66-70f2-11e4-839b-bc7e84103f67.png)\n\nIf it's difficult to determine the package handling the file type in question (for example, for `.md`-documents), you can also proceed as following. Put your cursor in a file in which you want the snippet to be available, open the [Command Palette](https://github.com/atom/command-palette)\n(<kbd>cmd-shift-p</kbd>), and run the `Editor: Log Cursor Scope` command. This will trigger a notification which will contain a list of scopes. The first scope that's listed is the scope for that language. Here are some examples: `source.coffee`, `text.plain`, `text.html.basic`.\n\n### Snippet syntax\n\nThis package supports a subset of the features of TextMate snippets, [documented here](http://manual.macromates.com/en/snippets#transformations).\n\nThe following features are not yet supported:\n\n* Variables\n* Interpolated shell code\n* Conditional insertions in transformations\n\n### Multi-line Snippet Body\n\nYou can also use multi-line syntax using `\"\"\"` for larger templates:\n\n```coffee\n'.source.js':\n  'if, else if, else':\n    'prefix': 'ieie'\n    'body': \"\"\"\n      if (${1:true}) {\n        $2\n      } else if (${3:false}) {\n        $4\n      } else {\n        $5\n      }\n    \"\"\"\n```\n\n### Escaping Characters\n\nIncluding a literal closing brace inside the text provided by a snippet's tab stop will close that tab stop early. To prevent that, escape the brace with two backslashes, like so:\n\n```coffee\n'.source.js':\n  'function':\n    'prefix': 'funct'\n    'body': \"\"\"\n      ${1:function () {\n        statements;\n      \\\\}\n      this line is also included in the snippet tab;\n      }\n      \"\"\"\n```\n\n### Multiple snippets for the same scope\n\nSnippets for the same scope must be placed within the same key. See [this section of the Atom Flight Manual](http://flight-manual.atom.io/using-atom/sections/basic-customization/#configuring-with-cson) for more information.\n","readmeFilename":"README.md"}