{"id":13486201,"url":"https://github.com/rhysd/nyaovim-markdown-preview","last_synced_at":"2025-08-02T17:10:55.749Z","repository":{"id":66059598,"uuid":"48736647","full_name":"rhysd/nyaovim-markdown-preview","owner":"rhysd","description":"Live Markdown Preview on NyaoVim","archived":false,"fork":false,"pushed_at":"2017-11-28T17:27:19.000Z","size":796,"stargazers_count":46,"open_issues_count":11,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-21T10:49:33.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/rhysd/NyaoVim","language":"HTML","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/rhysd.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}},"created_at":"2015-12-29T08:20:11.000Z","updated_at":"2025-02-06T14:38:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6ffd8ab-4157-48e3-b5a0-e9daf6a451f7","html_url":"https://github.com/rhysd/nyaovim-markdown-preview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rhysd/nyaovim-markdown-preview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-markdown-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-markdown-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-markdown-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-markdown-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhysd","download_url":"https://codeload.github.com/rhysd/nyaovim-markdown-preview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-markdown-preview/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268424028,"owners_count":24248119,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-07-31T18:00:41.465Z","updated_at":"2025-08-02T17:10:55.701Z","avatar_url":"https://github.com/rhysd.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"Live Markdown Preview in [NyaoVim](https://github.com/rhysd/NyaoVim)\n====================================================================\n\nThis is a UI plugin to provide live markdown preview UI for [NyaoVim](https://github.com/rhysd/NyaoVim).\nPreview is automatically opened/closed on `markdown` filetype and updated in real-time.  [marked](https://github.com/chjj/marked) converts current buffer to HTML and [highlight.js](https://github.com/isagalaev/highlight.js/) adds syntax highlight to code block.\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/nyaovim-markdown-preview/main.gif)\n\n## Installation\n\nAt first, install this repository as normal Neovim plugin with your favorite plugin manager.\n\nThen put `\u003cmarkdown-preview\u003e` component to your `~/.config/nyaovim/nyaovimrc.html` as below.\n\n```html\n\u003cstyle\u003e\n  /* CSS configurations here */\n  .horizontal {\n    display: flex;\n    width: 100%;\n    height: 100%;\n  }\n  neovim-editor {\n    width: 100%;\n    height: 100%;\n  }\n\u003c/style\u003e\n\n\u003cdiv class=\"horizontal\"\u003e\n  \u003cneovim-editor id=\"nyaovim-editor\" argv=\"[[argv]]\"\u003e\u003c/neovim-editor\u003e\n  \u003c!-- Put component --\u003e\n  \u003cmarkdown-preview editor=\"[[editor]]\"\u003e\u003c/markdown-preview\u003e\n\u003c/div\u003e\n```\n\nNote that this is just an example.  You can put this component as you like.  But I recommend flex layout to use space effectively.\n\n## How to Start Preview\n\nIf you set `g:markdown_preview_auto` (default: `1`) to `1`, this plugin automatically starts preview on `markdown` filetype.  Or you can start markdown preview by `:StartMarkdownPreview` commands.\n\nThe preview is updated on `TextChanged` by default.  If you want to update more frequently, you can set `g:markdown_preview_eager` to `1`.  If it is set to `1`, the preview is also updated on `TextChangedI`.\n\nIf you set `g:markdown_preview_auto` to `1`, it also stops automatically when the markdown document buffer gets hidden or is unloaded.  Or you can stop and dismiss markdown preview by `:StopMarkdownPreview` command manually.  \n\n## Mappings\n\nIf you don't set `g:markdown_preview_no_default_mapping` to `1`, this plugin automatically defines some mappings only in `markdown` filetype buffer to scroll preview.\n\n- `\u003cPlug\u003e(markdown-preview-scroll-up)` (default: `\u003cLeader\u003ek`)\n\nScroll markdown preview up by 3 lines.\n\n- `\u003cPlug\u003e(markdown-preview-scroll-down)` (default: `\u003cLeader\u003ej`)\n\nScroll markdown preview down by 3 lines.\n\n- `\u003cPlug\u003e(markdown-preview-scroll-top)` (default: `\u003cLeader\u003egg`)\n\nScroll markdown preview to top of window.\n\n- `\u003cPlug\u003e(markdown-preview-scroll-bottom)` (default: `\u003cLeader\u003eG`)\n\nScroll markdown preview to bottom of window.\n\n## `\u003cmarkdown-preview\u003e` Properties\n\n| Name | Description | Default |\n| ---- | ----------- | ------- |\n| `expand-width` (`Number`) | Expanding width of window on starting preview. (**optional**) | `undefined` |\n| `expand-height` (`Number`) | Expanding height of window on starting preview. (**optional**)| `undefined` |\n| `editor` (`Object`) | [Editor instance](https://github.com/rhysd/neovim-component#neovim-editor-apis) of `\u003cneovim-editor`\u003e component (**required**) | `undefined` |\n\n## License\n\nUnder MIT license.\n\n```\nCopyright (c) 2015 rhysd\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR\nTHE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fnyaovim-markdown-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhysd%2Fnyaovim-markdown-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fnyaovim-markdown-preview/lists"}