{"id":22419389,"url":"https://github.com/ckunte/typst-snippets-st","last_synced_at":"2026-03-19T22:48:20.897Z","repository":{"id":240920050,"uuid":"803787326","full_name":"ckunte/typst-snippets-st","owner":"ckunte","description":"Custom Typst snippets for use in Sublime Text","archived":false,"fork":false,"pushed_at":"2025-03-08T10:53:56.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T09:15:28.596Z","etag":null,"topics":["snippets-collection","sublime-text-plugin","typst","typst-snippets"],"latest_commit_sha":null,"homepage":"","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/ckunte.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":"2024-05-21T11:42:23.000Z","updated_at":"2025-03-08T10:54:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb60aa2e-052f-420b-a00e-bb380fc827de","html_url":"https://github.com/ckunte/typst-snippets-st","commit_stats":null,"previous_names":["ckunte/typst-snippets-st"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-st","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-st/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-st/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-st/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckunte","download_url":"https://codeload.github.com/ckunte/typst-snippets-st/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245785715,"owners_count":20671631,"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-collection","sublime-text-plugin","typst","typst-snippets"],"created_at":"2024-12-05T16:15:35.136Z","updated_at":"2026-01-06T09:07:36.011Z","avatar_url":"https://github.com/ckunte.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom Typst snippets for use in Sublime Text\n\nTypesetting documents, letters, reports, or even books in [Typst] is not as verbose as LaTeX, but certainly error-prone, given the need for strict syntax. A handful of [Sublime Text][st] snippets provided in this repository try to reduce this tedium to as low as practicable.\n\nThis repository contains the following custom snippets:\n\n| Snippet                   | Inserts                   |\n| ------------------------- | --------------------------|\n| `apdx` + \u003ckbd\u003etab\u003c/kbd\u003e   | appendix block            |\n| `bib` + \u003ckbd\u003etab\u003c/kbd\u003e    | BibTeX entry              |\n| `cod` + \u003ckbd\u003etab\u003c/kbd\u003e    | python code file          |\n| `fig` + \u003ckbd\u003etab\u003c/kbd\u003e    | figure block              |\n| `fgg` + \u003ckbd\u003etab\u003c/kbd\u003e    | figures block in grid     |\n| `fgr` + \u003ckbd\u003etab\u003c/kbd\u003e    | figure (rotated) block    |\n| `file` + \u003ckbd\u003etab\u003c/kbd\u003e   | file                      |\n| `hd` + \u003ckbd\u003etab\u003c/kbd\u003e     | set heading no.s          |\n| `letter` + \u003ckbd\u003etab\u003c/kbd\u003e | letter block              |\n| `lnk` + \u003ckbd\u003etab\u003c/kbd\u003e    | url and link label        |\n| `ltmpl` + \u003ckbd\u003etab\u003c/kbd\u003e  | letter template           |\n| `lscape` + \u003ckbd\u003etab\u003c/kbd\u003e | set page to landscape     |\n| `note` + \u003ckbd\u003etab\u003c/kbd\u003e   | note block                |\n| `ntmpl` + \u003ckbd\u003etab\u003c/kbd\u003e  | note template             |\n| `pb` + \u003ckbd\u003etab\u003c/kbd\u003e     | page break                |\n| `ref` + \u003ckbd\u003etab\u003c/kbd\u003e    | reference block           |\n| `tbl` + \u003ckbd\u003etab\u003c/kbd\u003e    | table block               |\n\nSome custom snippets (scope specific):\n\n| Snippet                   | Inserts                   |\n| ------------------------- | --------------------------|\n| `loc` + \u003ckbd\u003etab\u003c/kbd\u003e    | Insert location figure    |\n| `mrk` + \u003ckbd\u003etab\u003c/kbd\u003e    | Insert markup dwg rotated |\n| `p1` + \u003ckbd\u003etab\u003c/kbd\u003e     | Insert custom fig (2x1)   |\n| `p2` + \u003ckbd\u003etab\u003c/kbd\u003e     | Insert custom fig (2x1)x2 |\n| `strep` + \u003ckbd\u003etab\u003c/kbd\u003e  | Insert fig cf repair(s)   |\n\nThese snippets work when the file under edit is set as a Typst file from the pull-up menu in the status bar. (Suggest installing [Typst package][tp].)\n\n## What are snippets and how do they work?\n\nThe concept of a snippet is simple. Think of a block of pre-formatted text (i.e., a template) that one needs to use often. One can of-course type or copy-paste such blocks of text repeatedly the hard way, or one could instead assign such common blocks of text with an abbreviated keyword, which in turn calls the entire block of text. To ensure such blocks do not accidentally appear while typing the actual content of the note, paper, or report, a trigger is required. The trigger in this case is a \u003ckbd\u003etab\u003c/kbd\u003e key.\n\n## How to add these snippets to Sublime Text\n\nThis is done in two steps, viz., (a) add a repository and then (b) activate it. The how to is described below.\n\n1. From _Tools \u003e Command Palette..._ type _Add Repository_, and in the input box, enter `https://github.com/ckunte/typst-snippets-st`\n2. From _Tools \u003e Command Palette..._ type _Install Package_, and in the result list, type `typst-snippets-st` and select the thus found package.\n\n## How to upgrade \n\nFrom _Tools \u003e Command Palette..._ type _Upgrade Package_, and select one of the two options presented (i.e., _Package Control: Upgrade Package_ or _Package Control: Upgrade/Overwrite All Packages_).\n\n## Custom build\n\nA custom build file (e.g. like below: `Typst-Cyg.sublime-build`) can be added under _Settings \u003e Browse packages \u003e User_, with file path edited to suit:\n\n```\n{\n    \"shell_cmd\" : \"typst compile \\\"$file_name\\\"\",\n    \"selector\" : \"source.typ\",\n    \"path\" : \"C:\\\\Users\\\\ckun\\\\misc\\\\cyg\\\\bin;$path\",\n    \"working_dir\" : \"$file_path\"\n}\n```\nThen From _Tools \u003e Build system_, select _Typst-Cyg_. This will enable building (with Ctrl+B) from source to output (i.e. from .typ to .pdf file) from within Sublime Text.\n\n[Typst]: https://typst.app\n[st]: https://www.sublimetext.com \"Text editing done right.\"\n[tp]: https://packagecontrol.io/packages/Typst\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckunte%2Ftypst-snippets-st","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckunte%2Ftypst-snippets-st","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckunte%2Ftypst-snippets-st/lists"}