{"id":13665404,"url":"https://github.com/jonsmithers/vim-html-template-literals","last_synced_at":"2025-10-24T13:31:14.162Z","repository":{"id":149656674,"uuid":"125744234","full_name":"jonsmithers/vim-html-template-literals","owner":"jonsmithers","description":"Syntax highlighting for html template literals in javascript (as in lit-html and polymer 3)","archived":false,"fork":false,"pushed_at":"2024-09-13T20:55:38.000Z","size":89,"stargazers_count":71,"open_issues_count":3,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-09-14T11:55:03.328Z","etag":null,"topics":["javascript","js","lit-element","lit-html","litelement","polymer-3","syntax-highlighting","tagged-template-literals","template-literals","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","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/jonsmithers.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}},"created_at":"2018-03-18T16:20:07.000Z","updated_at":"2024-09-13T20:55:42.000Z","dependencies_parsed_at":"2023-05-15T01:30:42.961Z","dependency_job_id":null,"html_url":"https://github.com/jonsmithers/vim-html-template-literals","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonsmithers%2Fvim-html-template-literals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonsmithers%2Fvim-html-template-literals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonsmithers%2Fvim-html-template-literals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonsmithers%2Fvim-html-template-literals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonsmithers","download_url":"https://codeload.github.com/jonsmithers/vim-html-template-literals/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224031926,"owners_count":17244361,"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":["javascript","js","lit-element","lit-html","litelement","polymer-3","syntax-highlighting","tagged-template-literals","template-literals","vim"],"created_at":"2024-08-02T06:00:37.165Z","updated_at":"2025-10-24T13:31:14.089Z","avatar_url":"https://github.com/jonsmithers.png","language":"Vim Script","funding_links":[],"categories":["IDE Plugins","Tools"],"sub_categories":["IDE Plugins"],"readme":"# HTML Template Literals\n\nSyntax highlighting and indentation for html inside of tagged template\nliterals, as seen in [lit-html] and [Polymer 3].\n\n[lit-html]: https://lit-html.polymer-project.org\n[Polymer 3]: https://polymer-library.polymer-project.org/3.0/docs/about_30\n\n## Supported Syntaxes inside ``html`...` ``\n- HTML (including CSS embedded in `\u003cstyle\u003e` tags)\n- JavaScript string interpolation (`${...}`)\n- nested templates (``` html`${html`${}`}` ```)\n\nSee [Configuration](#configuration) for support for css tagged literals (``css`...` ``).\n\n## Installation\n\nThis plugin requires [vim-javascript] (or [typescript-vim] if you're using\ntypescript). If you use [vim-plug] for package management, installation looks\nlike this:\n\n[vim-javascript]: https://github.com/pangloss/vim-javascript\n[typescript-vim]: https://github.com/leafgarland/typescript-vim\n[vim-plug]: https://github.com/junegunn/vim-plug\n\n```vim\nPlug 'jonsmithers/vim-html-template-literals'\nPlug 'pangloss/vim-javascript'\n```\n\n_NOTE_: it's generally a good idea to have `let g:html_indent_style1 = \"inc\"`\nin your vimrc for reasonable indentation of `\u003cstyle\u003e` tags. See `:help\nhtml-indenting`.\n\n## Configuration\n\n| Flag                  | Description                                                                                                                |\n| --------------------  | -------------------------------------------------------------------------------------------------------------------------- |\n| `g:htl_css_templates` | Enable css syntax inside css-tagged template literals (`` css`...` ``). Indentation behavior is currently not implemented. |\n| `g:htl_all_templates` | (Experimental) Enable html syntax inside _all_ template literals (`` `...` ``).                                            |\n| `g:htl_tag_names`     | (Experimental) Specify the tag names in which to enable html syntax highlighting (default `['html']`).                     |\n\n## Known Issues\n\n- Indentation in general still has some kinks. If you see an issue, please\n  report it.\n- This plugin conflicts a bit with vim-jsx. Having both installed\n  simultaneously may result in undesired indentation behaviors.\n- A patch in vim 8.1 introduced native typescript support in Vim. However, its\n  region definitions are less precise and it's not easy to translate\n  vim-html-template-literals indentation behavior to work with Vim's native\n  typescript region definitions.\n\n## Tips\n\n- You can configure the [vim-closetag] plugin to work inside html template\n  literals:\n\n  ```vim\n  let g:closetag_filetypes = 'html,xhtml,phtml,javascript,typescript'\n  let g:closetag_regions = {\n        \\ 'typescript.tsx': 'jsxRegion,tsxRegion,litHtmlRegion',\n        \\ 'javascript.jsx': 'jsxRegion,litHtmlRegion',\n        \\ 'javascript':     'litHtmlRegion',\n        \\ 'typescript':     'litHtmlRegion',\n        \\ }\n  ```\n\n[vim-closetag]: https://github.com/alvan/vim-closetag\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonsmithers%2Fvim-html-template-literals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonsmithers%2Fvim-html-template-literals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonsmithers%2Fvim-html-template-literals/lists"}