maoschanz / gedit-plugin-markdown_preview

A gedit plugin previewing markdown (.md) documents
GNU General Public License v3.0
131 stars 15 forks source link
gedit gedit-plugin gnome gnome-desktop markdown pandoc pandoc-markdown

Gedit Markdown Preview

This is a plugin for the Gedit text editor, previewing .md files in the side pane (F9) or the bottom (Ctrl+F9) pane.

Previewing

This works for Markdown, HTML, and SVG files.

Exporting

You can print the preview, or export it:

Editing assistance


Screenshots

With the preview in the side pane, menu opened With the preview in the bottom pane, searching
With the preview in the side pane, menu opened With the preview in the bottom pane, searching

Installation

Packages

Even if you install the plugin with a package manager, you may like to read the following sections, since installing optional dependencies will enable new features of the plugin.

Manual installation

  1. Dependencies. Be sure to have these packages before installing the plugin:
    • gedit (≥3.22)
    • gir1.2-webkit2-4.0
    • python3-markdown or pandoc
    • if you want to export to PDF with pandoc, you'll need at least pdflatex and lmodern. Those are provided by texlive packages whose names vary depending on the distribution. Warning: the version provided by Debian is sadly broken (some error message about xcolor.sty).
    • libglib2.0-bin (needed for the installation script only). This is the package name on debian-based distros, it may differ on your system.
  2. Download the ZIP of the last release.
  3. Extract the archive.
  4. Open the project's folder in a terminal.
  5. Run ./install.sh — it can be executed as root (system-wide installation) or as a normal user (user-wide installation).

Activation

The plugin is now installed and has to be enabled:


Configuration

The plugin's options can be accessed…

General options

Rendering options

The preview can be generated with pandoc or python-markdown.

A stylesheet (CSS file) can be applied to the preview (markdown files only, it will not be loaded for HTML files).

Options with python-markdown

A set of extensions is provided natively with python-markdown. You can enable or disable them depending on your needs.

Great third-party extensions exist too, and once installed they can be added manually to the list.


Available languages