{"id":15138732,"url":"https://github.com/alsolovyev/nunjucks","last_synced_at":"2026-03-06T12:02:55.994Z","repository":{"id":54880150,"uuid":"243020019","full_name":"alsolovyev/Nunjucks","owner":"alsolovyev","description":"A Sublime Text package for Nunjucks templating engine.","archived":false,"fork":false,"pushed_at":"2025-01-04T23:16:35.000Z","size":119,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T04:51:47.664Z","etag":null,"topics":["nunjucks","nunjucks-snippets","nunjucks-syntax","package","snippets","sublime","sublime-text","syntax"],"latest_commit_sha":null,"homepage":"https://packagecontrol.io/packages/Nunjucks","language":null,"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/alsolovyev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-25T14:29:04.000Z","updated_at":"2025-03-21T07:25:37.000Z","dependencies_parsed_at":"2025-02-08T18:41:52.917Z","dependency_job_id":null,"html_url":"https://github.com/alsolovyev/Nunjucks","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/alsolovyev/Nunjucks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsolovyev%2FNunjucks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsolovyev%2FNunjucks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsolovyev%2FNunjucks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsolovyev%2FNunjucks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alsolovyev","download_url":"https://codeload.github.com/alsolovyev/Nunjucks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsolovyev%2FNunjucks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30175903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T11:48:51.886Z","status":"ssl_error","status_checked_at":"2026-03-06T11:48:51.460Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["nunjucks","nunjucks-snippets","nunjucks-syntax","package","snippets","sublime","sublime-text","syntax"],"created_at":"2024-09-26T07:44:03.538Z","updated_at":"2026-03-06T12:02:55.959Z","avatar_url":"https://github.com/alsolovyev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nunjucks\n\nA Sublime Text package for [Nunjucks](https://mozilla.github.io/nunjucks) templating engine.\n\n[![LICENSE](https://img.shields.io/badge/LICENSE-MIT-blue?style=for-the-badge)](https://github.com/alsolovyev/Nunjucks/blob/master/LICENSE)\n[![LICENSE](https://img.shields.io/badge/ST-Build%203092+-orange?style=for-the-badge\u0026logo=sublime-text)](https://www.sublimetext.com)\n[![Tag](https://img.shields.io/github/v/tag/alsolovyev/Nunjucks?style=for-the-badge\u0026logo=github\u0026sort=semver)](https://github.com/alsolovyev/Nunjucks/releases)\n[![Downloads](https://img.shields.io/packagecontrol/dt/Nunjucks?style=for-the-badge)](https://packagecontrol.io/packages/Nunjucks)\n\n[![Nunjucks](http://habrastorage.org/webt/n6/v8/-h/n6v8-hsag0t0dynxp1ab0uw7jhe.jpeg)](https://github.com/alsolovyev/Nunjucks)\n\n## Features\n\n- enhanced syntax highlighting\n- autocompletions for built in tags, filters, functions\n- additional snippets\n- additional keybindings\n- smart indentations\n\n## Installation\n\n**Via package control (recommended):**\n\n- open command palette\n- select `Package Control: Install Packages`\n- search for `Nunjucks`\n\n**Via GitHub repository:**\n\n- open command palette\n- select `Package Control: Add Repository`\n- paste `https://github.com/alsolovyev/Nunjucks` into the field that opens and press enter\n- open command palette\n- select `Package Control: Install Packages`\n- search for `Nunjucks`\n\n_* to update the package `Package Control: Upgrade Package` select `Nunjucks`_\n\n**Manually download sublime-package file:**\n\n- download sublime-package file: [Nunjucks.sublime-package](https://github.com/alsolovyev/Nunjucks/releases/download/v2.0.2/Nunjucks.sublime-package)\n- move it into your Sublime Text **Installed Packages** directory\n  - Windows: `%APPDATA%\\Sublime Text 3\\Installed Packages`\n  - OS X: `~/Library/Application\\ Support/Sublime\\ Text\\ 3/Installed\\ Packages`\n  - Linux: `~/.config/sublime-text-3/Installed Packages`\n\n**Manually download repository:**\n\n- clone [repository](https://github.com/alsolovyev/Nunjucks/archive/master.zip)\n- extract it into your Sublime Text **Packages** directory\n  - Windows: `%APPDATA%\\Sublime Text 3\\Packages`\n  - OS X: `~/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages`\n  - Linux: `~/.config/sublime-text-3/Packages`\n\n## Documentation\n\n### Syntaxes\n\n- [Nunjucks](https://github.com/alsolovyev/Nunjucks/blob/master/Syntaxes/Nunjucks.sublime-syntax) - HTML basic\n- [Nunjucks PHP](https://github.com/alsolovyev/Nunjucks/blob/master/Syntaxes/Nunjucks%20PHP.sublime-syntax) - with PHP syntax support\n\n### Filters\n\nYou can [create](https://mozilla.github.io/nunjucks/api#custom-filters) your own filters or use one of the [built-in](https://mozilla.github.io/nunjucks/templating.html#builtin-filters):\n\n- [`abs`](https://mozilla.github.io/nunjucks/templating.html#abs) - Return the absolute value of the argument\n- [`batch`](https://mozilla.github.io/nunjucks/templating.html#batch) - Return a list of lists with the given number of items\n- [`capitalize`](https://mozilla.github.io/nunjucks/templating.html#capitalize) - Make the first letter uppercase\n- [`center`](https://mozilla.github.io/nunjucks/templating.html#center) - Center the value in a field of a given width\n- [`default`](https://mozilla.github.io/nunjucks/templating.html#default-value-default-boolean) - Return default if value is undefined\n- [`dictsort`](https://mozilla.github.io/nunjucks/templating.html#dictsort) - Sort a dict and yield (key, value) pairs\n- [`dump`](https://mozilla.github.io/nunjucks/templating.html#dump) - Call JSON.stringify on an object and dump the result into the template\n- [`escape`](https://mozilla.github.io/nunjucks/templating.html#escape-aliased-as-e) - Convert the characters *\u0026*, *\u003c*, *\u003e*, *‘*, and *”* in strings to HTML-safe sequences\n- [`first`](https://mozilla.github.io/nunjucks/templating.html#first) - Get the first item in an array or the first letter if it's a string\n- [`float`](https://mozilla.github.io/nunjucks/templating.html#float) - Convert a value into a floating point number\n- [`forceescape`](https://mozilla.github.io/nunjucks/templating.html#forceescape) - Enforce HTML escaping\n- [`groupby`](https://mozilla.github.io/nunjucks/templating.html#groupby) - Group a sequence of objects by a common attribute\n- [`indent`](https://mozilla.github.io/nunjucks/templating.html#indent) - Indent a string using spaces\n- [`int`](https://mozilla.github.io/nunjucks/templating.html#int) - Convert the value into an integer\n- [`join`](https://mozilla.github.io/nunjucks/templating.html#join) - Return a string which is the concatenation of the strings in a sequence\n- [`last`](https://mozilla.github.io/nunjucks/templating.html#last) - Get the last item in an array or the last letter if it's a string\n- [`length`](https://mozilla.github.io/nunjucks/templating.html#length) - Return the length of an array or string, or the number of keys in an object\n- [`list`](https://mozilla.github.io/nunjucks/templating.html#list) - Convert the value into a list\n- [`lower`](https://mozilla.github.io/nunjucks/templating.html#lower) - Convert string to all lower case\n- [`nl2br`](https://mozilla.github.io/nunjucks/templating.html#nl2br) - Replace new lines with `\u003cbr /\u003e` HTML elements\n- [`random`](https://mozilla.github.io/nunjucks/templating.html#random) - Select a random value from an array\n- [`reject`](https://mozilla.github.io/nunjucks/templating.html#reject) - Filters a sequence of objects by applying a test to each object, and rejecting the objects with the test succeeding\n- [`rejectattr`](https://mozilla.github.io/nunjucks/templating.html#rejectattr-only-the-single-argument-form) - Filter a sequence of objects by applying a test to the specified attribute of each object, and rejecting the objects with the test succeeding\n- [`replace`](https://mozilla.github.io/nunjucks/templating.html#replace) - Replace one item with another\n- [`reverse`](https://mozilla.github.io/nunjucks/templating.html#reverse) - Reverse a string\n- [`round`](https://mozilla.github.io/nunjucks/templating.html#round) - Round a number\n- [`safe`](https://mozilla.github.io/nunjucks/templating.html#safe) - Mark the value as safe\n- [`select`](https://mozilla.github.io/nunjucks/templating.html#select) - Filters a sequence of objects by applying a test to each object, and only selecting the objects with the test succeeding\n- [`selectattr `](https://mozilla.github.io/nunjucks/templating.html#selectattr-only-the-single-argument-form) - Filter a sequence of objects by applying a test to the specified attribute of each object, and only selecting the objects with the test succeeding\n- [`slice`](https://mozilla.github.io/nunjucks/templating.html#slice) - Slice an iterator and return a list of lists containing those items\n- [`sort`](https://mozilla.github.io/nunjucks/templating.html#sort-arr-reverse-casesens-attr) - Sort `arr` with JavaScript's `arr.sort` function\n- [`string`](https://mozilla.github.io/nunjucks/templating.html#string) - Convert an object to a string\n- [`striptags`](https://mozilla.github.io/nunjucks/templating.html#striptags-value-preserve_linebreaks) - Strip SGML/XML tags and replace adjacent whitespace by one space\n- [`sum`](https://mozilla.github.io/nunjucks/templating.html#sum) - Output the sum of items in the array\n- [`title`](https://mozilla.github.io/nunjucks/templating.html#title) - Make the first letter of the string uppercase\n- [`trim`](https://mozilla.github.io/nunjucks/templating.html#trim) - Strip leading and trailing whitespace\n- [`truncate`](https://mozilla.github.io/nunjucks/templating.html#truncate) - Return a truncated copy of the string\n- [`upper`](https://mozilla.github.io/nunjucks/templating.html#upper) - Convert the string to upper case\n- [`urlencode`](https://mozilla.github.io/nunjucks/templating.html#urlencode) - Escape strings for use in URLs, using UTF-8 encoding\n- [`urlize`](https://mozilla.github.io/nunjucks/templating.html#urlize) - Convert URLs in plain text into clickable links\n- [`wordcount`](https://mozilla.github.io/nunjucks/templating.html#wordcount) - Count and output the number of words in a string\n\n### Global Functions\n\n- [`range`](https://mozilla.github.io/nunjucks/templating.html#range-start-stop-step) - Iterates over a fixed set of numbers\n- [`cycler`](https://mozilla.github.io/nunjucks/templating.html#cycler-item1-item2-itemn) - Rotates through several values\n- [`joiner`](https://mozilla.github.io/nunjucks/templating.html#joiner-separator) - Combines multiple items except for the first time\n\n### Snippets\n\n- [`{`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/braces.sublime-snippet) - Curly braces for variables\n- [`%`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/tag.sublime-snippet) - Braces for code\n- [`bl`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/block.sublime-snippet) - Define a section in a template\n- [`cb`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/comment_block.sublime-snippet) - BEGIN-END comment block\n- [`cl`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/call.sublime-snippet) -  Call a macro with all the text inside the tag\n- [`co`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/comment.sublime-snippet) - Braces for comments\n- [`ext`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/extends.sublime-snippet) -  \"Extends\" another template\n- [`fl`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/filter.sublime-snippet) - Custom filters template\n- [`for`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/for.sublime-snippet) - For loop\n- [`fr`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/import_from.sublime-snippet) - Import specific values from a template\n- [`fras`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/import_from_as.sublime-snippet) - Import specific values from a template and bind to a variable\n- [`if`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/if.sublime-snippet) - If statement\n- [`ife`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/if_else.sublime-snippet) - If...Else statement\n- [`iif`](https://github.com/alsolovyev/Nunjucks/blob/dev/Snippets/if_inline.sublime-snippet) - Inline if statement\n- [`im`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/import.sublime-snippet) - Import a template\n- [`imas`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/import_as.sublime-snippet) - Import a template and bind to a variable\n- [`inc`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/include.sublime-snippet) - Include a template\n- [`mc`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/macro.sublime-snippet) - Define reusable chunks of content(macro)\n- [`raw`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/raw.sublime-snippet) - Output the code inside the tag as plain text\n- [`set`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/set.sublime-snippet) - Create/modify a variable\n- [`setb`](https://github.com/alsolovyev/Nunjucks/blob/master/Snippets/set_block.sublime-snippet) - Create/modify a variable(block)\n\n### Autocompletions\n\nCurrently available completions for all keywords, tags, built-in functions and filters supported by Nunjucks templating engine. Visit the official [documentation](https://mozilla.github.io/nunjucks/templating.html) for more details.\n\nIf for some reason the autocomplete popup window does not appear, you need to add `text.html.njk` to autocomplete selectors:\n\n- open command palette\n- select `Preferences: Settings`\n- find `auto_complete_selector`\n- add `text.html.njk`\n\n### Keybindings\n\n- pressing `shift` + `{` twice will turn into `{{ | }}`\n- pressing `shift` + `%` within `{}` will turn into `{% | %}`\n- pressing `shift` + `#` within `{}` will turn into `{# | #}`\n\n## Notes\n\nThis package was created based on my personal experience with Nunjucks templating engine. Because of what, when writing, I could miss something. Please let me know if you find any inaccuracies or would like to see some additional snippets.\n\nThank you for downloading this package, and I hope you'll enjoy it.\n\n## Links\n\n- [Nunjucks](https://mozilla.github.io/nunjucks/) templating engine\n- Sublime Text community [documentation](https://docs.sublimetext.io/)\n- [Documentation](https://www.sublimetext.com/docs/syntax.html) for `.sublime-syntax` files\n- [Documentation](https://www.sublimetext.com/docs/indentation.html) for indentation settings\n- [Documentation](https://www.sublimetext.com/docs/menus.html) for menu\n- [Documentation](https://github.com/kkos/oniguruma/blob/master/doc/RE) for Oniguruma regex engine\n- [Recommended](https://www.sublimetext.com/docs/3/scope_naming.html#example_syntaxes) scope names\n- Naming [Conventions](https://macromates.com/manual/en/language_grammars#naming_conventions)\n\n## License\n\nThis project is licensed under the [MIT](./LICENSE) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsolovyev%2Fnunjucks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falsolovyev%2Fnunjucks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsolovyev%2Fnunjucks/lists"}