{"id":15381001,"url":"https://github.com/tani/vim-glance","last_synced_at":"2025-08-20T18:33:34.715Z","repository":{"id":37388805,"uuid":"455476410","full_name":"tani/vim-glance","owner":"tani","description":"Preview document wrtting in YOUR markdown and asciidoc, POD.","archived":false,"fork":false,"pushed_at":"2024-12-01T01:19:31.000Z","size":99,"stargazers_count":39,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-10T05:42:57.362Z","etag":null,"topics":["deno","denops","markdown","neovim","pod","vim","vim-denops"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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},"funding":{"github":"tani"}},"created_at":"2022-02-04T08:43:44.000Z","updated_at":"2024-11-21T12:23:20.000Z","dependencies_parsed_at":"2023-12-24T14:29:26.754Z","dependency_job_id":"9aa64c07-5af0-499e-aaf2-5d3306f4daf4","html_url":"https://github.com/tani/vim-glance","commit_stats":{"total_commits":69,"total_committers":8,"mean_commits":8.625,"dds":0.4492753623188406,"last_synced_commit":"e6450731c8ee08a022f1385b3aef1f53b91df08e"},"previous_names":["tani/vim-glance","tani/glance-vim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tani%2Fvim-glance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tani%2Fvim-glance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tani%2Fvim-glance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tani%2Fvim-glance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tani","download_url":"https://codeload.github.com/tani/vim-glance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445926,"owners_count":18227060,"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":["deno","denops","markdown","neovim","pod","vim","vim-denops"],"created_at":"2024-10-01T14:25:18.945Z","updated_at":"2024-12-19T14:07:56.555Z","avatar_url":"https://github.com/tani.png","language":"TypeScript","funding_links":["https://github.com/sponsors/tani"],"categories":[],"sub_categories":[],"readme":"# vim-glance\n\n![](https://user-images.githubusercontent.com/5019902/152632510-6c2081f1-213f-4123-9739-bd1fd6e2c765.png)\n\n**UPDATE:** The glance-vim now supports Asciidoc and POD file types. You can preview these file types within the vim editor by typing `:Glance` in a buffer that houses these specific file types.\n\nThe plugin offers a customization mechanism for rendering documents using markdown-it plugins.\nIf you desire to use emojis within your markdown, you can simply append `markdown-it-emoji` plugin URL to the `g:glance#plugins` as shown below:\n\n```vim\nlet g:glance#markdown_plugins = ['https://esm.sh/markdown-it-emoji']\n```\n\nThe above plugin is loaded dynamically within Deno, consequently rendering the buffer content with _markdown-it_. The rendered content is subsequently dispatched as an HTML document to your browser.\n\nGlance Vim offers various handy features:\n\n- Monitoring cursor movement within Vim.\n- Adding a custom preamble to the beginning of your HTML output.\n- Facilitating content synchronization between the buffer and the browser.\n- Operating in offline mode where Deno caches the markdown-it plugins.\n\nBegin crafting your documents with your own flavored markdown.\n\n## Installation\n\nThis plugin requires denops.vim and Deno.\nFor example, to use this plugin with [vim-jetpack](https://github.com/tani/vim-jetpack).\nOptionally, to use POD renderer, you need to install [podium](https://github.com/tani/podium) as well.\n\n```vim\nJetpack 'vim-denops/denops.vim'\nJetpack 'tani/glance-vim'\nJetpack 'tani/podium'           \"For POD file, optional\n```\n\n## Usage\n\nPlease hit the command `:Glance` in Vim and open `http://localhost:8765` in the browser. Use `:GlanceStop` to stop\nglance.\n\n- `g:glance#server_hostname (127.0.0.1)` is a hostname to serve the previewer.\n- `g:glance#server_port (8765)` is a port number to serve the previewer.\n- `g:glance#server_open (v:true)` is a boolean value to open the previewer automatically\n- `g:glance#server_silent (v:false)` is a boolean value to notify or silent logs from the server\n- `g:glance#markdown_plugins ([])` is a list of URLs for the markdown-it plugins.\n- `g:glance#markdown_html (v:false)` is a boolean value to be enable HTML tags in markdown.\n- `g:glance#markdown_linkify (v:false)` is a boolean value to render URLs as `a` elments .\n- `g:glance#markdown_breaks (v:false)` is a boolean value to convert newlines into `br` elements.\n- `g:glance#stylesheet ('')` is a string, which will be appended as a CSS stylesheet.\n    - NOTE: The type of a variable **with heredoc in a Vim script** will be **list of a string** (see also:`:h let-heredoc`). So you need use with them `join()` function, like bellow.\n\n```vim\nlet s:stylesheet =\u003c\u003c trim END\nhtml, body, #viewer {\n  border: none;\n  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;\n}\nEND\nlet g:glance#stylesheet = join(s:stylesheet, \"\\n\")\n```\n\n## Advanced Usage\n\nGlance Vim has an interface to extend the MarkdownIt renderer in TypeScript.\n\nStep1: Set path of configuration file `g:glance#config` such as `~/.config/glance/init.ts`\n\n```vim\nlet g:glance#config = expand('~/.config/glance/init.ts')\n```\n\nStep2: Write a configuration in TypeScript.\n\n```typescript\n// ~/.config/glance/init.ts\nimport markdownItEmoji from \"https://esm.sh/markdown-it-emoji\";\nimport MarkdownIt from \"https://esm.sh/markdown-it\";\n\nexport function createMarkdownRenderer(md: MarkdownIt): MarkdownIt {\n  return md.use(markdownItEmoji);\n}\n```\n\n## Related Plugins\n\n- [previm](https://github.com/previm/previm)\n- [bufpreview.vim](https://github.com/kat0h/bufpreview.vim)\n- [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim)\n\n## Copyright and License\n\nCopyrihgt (c) 2023 TANIGUCHI Masaya. All rights reserved. This plugin is released under\n[MIT License](http://git.io/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftani%2Fvim-glance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftani%2Fvim-glance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftani%2Fvim-glance/lists"}