{"id":13646688,"url":"https://github.com/joaotavora/yasnippet","last_synced_at":"2026-03-15T03:02:46.802Z","repository":{"id":40374851,"uuid":"2537904","full_name":"joaotavora/yasnippet","owner":"joaotavora","description":"A template system for Emacs","archived":false,"fork":false,"pushed_at":"2025-04-03T19:26:41.000Z","size":5231,"stargazers_count":2857,"open_issues_count":152,"forks_count":313,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-04-15T05:16:48.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://joaotavora.github.io/yasnippet/","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaotavora.png","metadata":{"files":{"readme":"README.mdown","changelog":"NEWS","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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,"zenodo":null}},"created_at":"2011-10-08T12:05:37.000Z","updated_at":"2025-04-14T06:36:16.000Z","dependencies_parsed_at":"2023-02-16T01:15:57.108Z","dependency_job_id":"eacfd18d-2bdc-4046-b7df-d28a54c2d200","html_url":"https://github.com/joaotavora/yasnippet","commit_stats":{"total_commits":1189,"total_committers":66,"mean_commits":"18.015151515151516","dds":0.5399495374264087,"last_synced_commit":"5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Fyasnippet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Fyasnippet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Fyasnippet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Fyasnippet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaotavora","download_url":"https://codeload.github.com/joaotavora/yasnippet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254040696,"owners_count":22004594,"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":[],"created_at":"2024-08-02T01:03:03.306Z","updated_at":"2025-12-17T19:19:37.188Z","avatar_url":"https://github.com/joaotavora.png","language":"Emacs Lisp","funding_links":[],"categories":["Development","Emacs Lisp","others","Text Editor Extensions ##"],"sub_categories":["Snippets Manager","Emacs ###"],"readme":"[![Build Status](https://travis-ci.org/joaotavora/yasnippet.png)](https://travis-ci.org/joaotavora/yasnippet)\n\n# Intro\n\n**YASnippet** is a template system for Emacs. It allows you to\ntype an abbreviation and automatically expand it into function\ntemplates. Bundled language templates include: C, C++, C#, Perl,\nPython, Ruby, SQL, LaTeX, HTML, CSS and more. The snippet syntax\nis inspired from [TextMate's][textmate-snippets] syntax, you can\neven [import](#import) most TextMate templates to\nYASnippet. Watch [a demo on YouTube][youtube-demo].\n\n[textmate-snippets]: http://manual.macromates.com/en/snippets\n[youtube-demo]: http://www.youtube.com/watch?v=ZCGmZK4V7Sg\n\n# Installation\n\n## Manual install from Git\n\nClone this repository somewhere\n\n    $ cd ~/.emacs.d/plugins\n    $ git clone --recursive https://github.com/joaotavora/yasnippet\n\nAdd the following in your `.emacs` file:\n\n    (add-to-list 'load-path\n                  \"~/.emacs.d/plugins/yasnippet\")\n    (require 'yasnippet)\n    (yas-global-mode 1)\n\nAdd your own snippets to `~/.emacs.d/snippets` by placing files there or invoking `yas-new-snippet`.\n\n## Install with `package-install`\n\nIn a recent emacs `M-x list-packages` is the recommended way to list\nand install packages.\nIt's available from [GNU ELPA][gnuelpa].\nIf you need a very recent snapshot, you can get it from\n[GNU-devel ELPA][gnudevel] as well as [MELPA][melpa]\n(see http://melpa.org/#installing).\n\n## Install with el-get\n\nEl-get is another nice way to get the most recent version, too. See\nhttps://github.com/dimitri/el-get for instructions.\n\n## Use `yas-minor-mode` on a per-buffer basis\n\nTo use YASnippet as a non-global minor mode, don't call\n`yas-global-mode`; instead call `yas-reload-all` to load the snippet\ntables and then call `yas-minor-mode` from the hooks of major-modes\nwhere you want YASnippet enabled.\n\n    (yas-reload-all)\n    (add-hook 'prog-mode-hook #'yas-minor-mode)\n\n# Where are the snippets?\n\n\u003ca name=\"import\"\u003e\u003c/a\u003e\n\nYASnippet no longer bundles snippets directly, but it's very easy to\nget some!\n\n1. [yasnippet-snippets] - a snippet collection package maintained by\n    [AndreaCrotti](https://github.com/AndreaCrotti).\n\n    It can be installed with `M-x package-install RET\n    yasnippet-snippets` if you have added MELPA to your package\n    sources.\n\n2. [yasmate] a tool which is dedicated to converting textmate bundles\n    into yasnippet snippets.\n\n    To use these snippets you have to run the tool first, so\n    [see its doc][yasmate]), and then point the `yas-snippet-dirs`\n    variable to the `.../yasmate/snippets` subdir.\n3.  [textmate-to-yas.el]\n\n    This is another textmate bundle converting tool using Elisp\n    instead of Ruby.\n\nNaturally, you can point `yas-snippet-dirs` to good snippet collections out\nthere. If you have created snippets for a mode, or multiple modes,\nconsider creating a repository to host them, then tell users that it\nshould be added like this to `yas-snippet-dirs`:\n\n    (setq yas-snippet-dirs\n          '(\"~/.emacs.d/snippets\"                 ;; personal snippets\n            \"/path/to/some/collection/\"           ;; foo-mode and bar-mode snippet collection\n            \"/path/to/yasnippet/yasmate/snippets\" ;; the yasmate collection\n            ))\n\n    (yas-global-mode 1) ;; or M-x yas-reload-all if you've started YASnippet already.\n\n# Manual, issues etc\n\nThere's comprehensive [documentation][docs] on using and customising\nYASnippet.\n\nThere's a [list of support issues][support-issues], with solutions to\ncommon problems and practical snippet examples.\n\nThe [Github issue tracker][issues] is where most YASnippet-related\ndiscussion happens.  Nevertheless, since YASnippet is a part of Emacs,\nyou may alternatively report bugs to Emacs via `M-x report-emacs-bug` or\nsending an email to `bug-gnu-emacs@gnu.org`, putting \"yasnippet\"\nsomewhere in the subject.\n\n## Important note regarding bug reporting\n\nYour bug reports are very valuable.\n\nThe most important thing when reporting bugs is making sure that we have\na way to reproduce the problem exactly like it happened to you.\n\nTo do this, we need to rule out interference from external factors\nlike other Emacs extensions or your own customisations.\n\nHere's an example report that \"sandboxes\" an Emacs session just for\nreproducing a bug.\n\n```\n$ emacs --version\nEmacs 24.3\n$ cd /tmp/\n$ git clone https://github.com/joaotavora/yasnippet.git yasnippet-bug\n$ cd yasnippet-bug\n$ git log -1 --oneline\n6053db0 Closes #527: Unbreak case where yas-fallback-behaviour is a list\n$ HOME=$PWD emacs -L . # This \"sandboxes\" your emacs, melpa configuration, etc\n\n(require 'yasnippet)\n(yas-global-mode 1)\n\nWhen I open a foo-mode file I don't see foo-mode under the \"YASnippet\" menu!\nOR\nWhen loading yasnippet I see \"Error: failed to frobnicate\"!\n```\n\nUsing `emacs -Q` or temporarily moving your `.emacs` init file to the side\nis another way to achieve good reproducibility.\n\nHere's a\n[another example](https://github.com/joaotavora/yasnippet/issues/318)\nof a bug report. It has everything needed for a successful analysis\nand speedy resolution.\n\nAlso, don't forget to state the Emacs version (use `M-x emacs-version`) and\nthe yasnippet version you are using (if using the latest from github,\ndo `git log -1` in the dir).\n\nAny more info is welcome, but don't just paste a backtrace or an error\nmessage string you got, unless we ask for it.\n\nFinally, thank you very much for using YASnippet!\n\n[docs]: http://joaotavora.github.io/yasnippet/\n[issues]: https://github.com/joaotavora/yasnippet/issues\n[support-issues]: https://github.com/joaotavora/yasnippet/issues?q=label%3Asupport\n[googlecode tracker]: http://code.google.com/p/yasnippet/issues/list\n[forum]: http://groups.google.com/group/smart-snippet\n[melpa]: http://melpa.milkbox.net/\n[gnuelpa]: http://elpa.gnu.org/packages/yasnippet.html\n[gnudevel]: http://elpa.gnu.org/devel/yasnippet.html\n[yasmate]: http://github.com/joaotavora/yasmate\n[textmate-to-yas.el]: https://github.com/mattfidler/textmate-to-yas.el\n[yasnippet-snippets]: http://github.com/AndreaCrotti/yasnippet-snippets\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaotavora%2Fyasnippet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaotavora%2Fyasnippet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaotavora%2Fyasnippet/lists"}