{"id":22419388,"url":"https://github.com/ckunte/typst-snippets-vim","last_synced_at":"2026-04-29T08:01:48.343Z","repository":{"id":242367075,"uuid":"805648270","full_name":"ckunte/typst-snippets-vim","owner":"ckunte","description":"Custom Typst snippets for use in Vim or Neovim","archived":false,"fork":false,"pushed_at":"2026-04-02T04:58:03.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-02T17:48:18.182Z","etag":null,"topics":["neovim","snippets","typst","typst-snippets","ultisnips","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Snippet","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-25T04:31:32.000Z","updated_at":"2026-04-02T04:58:07.000Z","dependencies_parsed_at":"2024-06-02T15:54:35.140Z","dependency_job_id":null,"html_url":"https://github.com/ckunte/typst-snippets-vim","commit_stats":null,"previous_names":["ckunte/typst-snippets-vim"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ckunte/typst-snippets-vim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckunte","download_url":"https://codeload.github.com/ckunte/typst-snippets-vim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckunte%2Ftypst-snippets-vim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["neovim","snippets","typst","typst-snippets","ultisnips","vim"],"created_at":"2024-12-05T16:15:34.983Z","updated_at":"2026-04-29T08:01:48.329Z","avatar_url":"https://github.com/ckunte.png","language":"Vim Snippet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom Typst snippets for use in Vim and Neovim\n\nTypesetting documents, letters, reports, or even books in [Typst] is not as verbose as LaTeX, but can be error-prone, given the need for strict syntax. A handful of Vim 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    | bibliography entry   |\n| `cod` + \u003ckbd\u003etab\u003c/kbd\u003e    | code file            |\n| `fig` + \u003ckbd\u003etab\u003c/kbd\u003e    | figure block         |\n| `file` + \u003ckbd\u003etab\u003c/kbd\u003e   | file                 |\n| `gal` + \u003ckbd\u003etab\u003c/kbd\u003e    | image gallery        |\n| `hd` + \u003ckbd\u003etab\u003c/kbd\u003e     | set heading number   |\n| `letter` + \u003ckbd\u003etab\u003c/kbd\u003e | letter block         |\n| `lnk` + \u003ckbd\u003etab\u003c/kbd\u003e    | add link             |\n| `ltmpl` + \u003ckbd\u003etab\u003c/kbd\u003e  | letter template      |\n| `note` + \u003ckbd\u003etab\u003c/kbd\u003e   | note block           |\n| `pb` + \u003ckbd\u003etab\u003c/kbd\u003e     | page break           |\n| `pdfr` + \u003ckbd\u003etab\u003c/kbd\u003e   | PDF pages in a range |\n| `ref` + \u003ckbd\u003etab\u003c/kbd\u003e    | bibliography block   |\n| `tbl` + \u003ckbd\u003etab\u003c/kbd\u003e    | table block          |\n| `ctbl` + \u003ckbd\u003etab\u003c/kbd\u003e   | csv table block      |\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\nIn Vim's insert mode, typing `note` and hitting \u003ckbd\u003etab\u003c/kbd\u003e key on the keyboard inserts the following block, and focuses on the first user input _Title_ in the template. Type the title. To jump to the next placeholder _Author_, hold \u003ckbd\u003ectrl\u003c/kbd\u003e and press \u003ckbd\u003ej\u003c/kbd\u003e (`c-j` in Vim parlance). The shortcut to jumping between placeholders can be set in `~/.vimrc` file, see installation section. \n\n```typst\n#import \"template.typ\": *\n#show: note.with(\n  title: [${1:Title}],\n  author: \"${2:Author}\",\n  paper: \"a4\",\n)\n// content from here-on\n```\n\n## Requirements\n\nTo be able to use snippets, the following are required:\n\n1. Vim or Neovim with python3 support.\n2. [UltiSnips][us] \n3. [typst-snippets-vim][ck]\n\n## Installation\n\n1. Set up [vim-plug][vp] plug-in manager\n2. Set the required UltiSnips plug-in for [typst-snippets-vim][ck] by adding the following to `.vimrc` file:\n\n```vim\ncall plug#begin('~/.vim/plugged')\n\n\" UltiSnips for snippets\nPlug 'sirver/ultisnips'\n\n\" Typst snippets for Vim using UltiSnips (downloads only tagged releases)\nPlug 'ckunte/typst-snippets-vim', { 'tag': '*' }\n\ncall plug#end()\n\nlet g:UltiSnipsExpandTrigger = '\u003ctab\u003e'\nlet g:UltiSnipsJumpForwardTrigger = '\u003cc-j\u003e'\nlet g:UltiSnipsJumpBackwardTrigger = '\u003cc-k\u003e'\n```\n\nReload `.vimrc` and `:PlugInstall` to install plug-ins.\n\n[Typst]: https://typst.app\n[us]: https://github.com/SirVer/ultisnips\n[vp]: https://github.com/junegunn/vim-plug\n[ck]: https://github.com/ckunte/typst-snippets-vim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckunte%2Ftypst-snippets-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckunte%2Ftypst-snippets-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckunte%2Ftypst-snippets-vim/lists"}