Compatible with Linux, macOS and WSL1.
See updates live in your browser as you edit your files.
Live Preview auto scrolls following your cursor in Neovim.
scroll.mp4
Toggle between light and dark modes.
themes.mp4
Cursorline position is estimated and may sometimes be a bit off.
cursorline.mp4
If an absolute URL (e.g. https://...) is detected, the plugin checks if it's a video source, and if it is, the video is rendered.
Has only been tested with videos uploaded directly through the GitHub Editor
as explained here, but any URL that responds with a valid
video src <video src={url}>
should be rendered as a video. If your internet connection is slow,
it may take some seconds for the video to render.
video.mp4
Relative image sources (example: ![image](./docs/github.svg)
) are resolved and rendered if found.
When the plugin starts, it attempts to find a .git
directory to identify a repository root.
If no repository is found, repository mode is disabled and plugin starts
in single-file mode.
You can also force single-file mode in your config, toggle it through the web UI, or through the functions this plugin exposes.
In this mode, the preview is locked to one buffer.
single-file.mp4
If a git repository is detected, repository mode is enabled.
You can disable repository mode in your config by forcing single-file mode.
In this mode, the preview will follow your cursor wherever it goes. You can click on relative links and browse the repository similar to how you would do it on GitHub.
repository.mp4
Basic mermaid support.
The following block would result in the svg below.
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
Footnotes
-
When running github-preview in WSL, the system will attempt to open a browser from the Linux system. You could either install a Linux browser for auto-open to work or you can manually open a browser in your Windows system and enter github-preview's url (by default: http://localhost:6041). ↩