Skip to content

Latest commit

 

History

History
112 lines (76 loc) · 3.71 KB

FEATURES.md

File metadata and controls

112 lines (76 loc) · 3.71 KB

✨ Features

💻 Linux / macOS / WSL

Compatible with Linux, macOS and WSL1.

🔴 LIVE updates

See updates live in your browser as you edit your files.

♻️ Synced Scrolling

Live Preview auto scrolls following your cursor in Neovim.

scroll.mp4

🌈 Dark & Light modes

Toggle between light and dark modes.

themes.mp4

🖍️ Cursorline in Preview

Cursorline position is estimated and may sometimes be a bit off.

cursorline.mp4

📹 Video Support

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

🏞️ Local Image Support

Relative image sources (example: ![image](./docs/github.svg)) are resolved and rendered if found.

📌 Single-file mode

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

📂 Repository mode

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

🧜 Mermaid Support

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!
Loading

Footnotes

  1. 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).