Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@

[![checks](https://github.com/pmeinhardt/maxdown/actions/workflows/build.yml/badge.svg)](https://github.com/pmeinhardt/maxdown/actions/workflows/build.yml)

Maxdown is a simple and fast Markdown-to-HTML converter. It comes with a command-line interface and an integration for (Neo)Vim.
Maxdown is a simple and fast *Markdown-to-HTML converter*.

It comes with a command-line interface and an integration for Vim and Neovim.

![](./media/banner.png)

## Before you get going 🐿️

You will need [`cargo`](https://doc.rust-lang.org/cargo/index.html) in order to build the `maxdown` command-line tool.
You will need `rustc` and `cargo` to build the project. It is recommended to install the Rust toolchain via [`rustup`](https://rust-lang.org/tools/install/).

In case you are using [Homebrew](https://brew.sh/), you can use the `rustup` formula.

In case you are using [Homebrew](https://brew.sh/), it should be as easy as `brew install rust`.
```shell
# Install Rustup via Homebrew
brew install rustup

# Set default toolchain to stable and install it
rustup default stable
```

## Installation 🪛

Expand Down Expand Up @@ -48,7 +58,7 @@ Plug 'pmeinhardt/maxdown', {'do': ':MaxdownCompile'}

If you have a different way of managing your Vim plugins, make sure you add the project directory to your `runtimepath` and build the command-line tool:

```sh
```shell
cargo build --release --locked
```

Expand All @@ -66,7 +76,7 @@ The `maxdown` command-line tool reads Markdown from `stdin` or a file and output

For instance:

```sh
```shell
echo 'Hello *World*!' | maxdown
maxdown README.md
```
Expand Down Expand Up @@ -94,23 +104,22 @@ Options:

### Vim plugin

To preview the current markdown buffer, invoke `:MaxdownPreview`.
To preview the current Markdown buffer, invoke `:MaxdownPreview`.

To replace the buffer's content with the corresponding HTML, use `:MaxdownConvert`.

Alternatively, define a custom mapping. For instance:
If you use these more frequently, define a custom mapping. For instance:

```vim
" Create a normal-mode mapping for previewing Markdown. Adjust the key sequence as you like.
autocmd FileType markdown nnoremap <buffer> <localleader>m <Plug>MaxdownPreview
```

This will create a normal-mode mapping to preview the current markdown buffer.

To replace the current Markdown buffer's content with the corresponding HTML, use `:MaxdownConvert`.

If you have other use cases, you always have the option of defining your own custom commands and mappings using the command-line tool.

## Enhancements 🪄

With the `ql` [Vim plugin](https://github.com/pmeinhardt/ql), previews on macOS will look more neat (no `[DEBUG]` in the title):
When paired with the `ql` [Vim plugin](https://github.com/pmeinhardt/ql), Maxdown previews on macOS will look more neat (no `[DEBUG]` in the title):

```vim
Plug 'pmeinhardt/ql', {'do': ':QuickLookCompile'}
Expand Down
Binary file modified media/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.