• Stars
    star
    625
  • Rank 71,862 (Top 2 %)
  • Language
    Rust
  • Created over 9 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An asynchronous markdown preview plugin for Vim and Neovim.

vim-markdown-composer

vim-markdown-composer is a plugin that adds asynchronous Markdown preview to Neovim and Vim.

By default, vim-markdown-composer uses a blazing-fast CommonMark (and GitHub)-compliant renderer. However, it can be configured to use any external program for rendering, such as pandoc.

Requirements

This plugin requires Neovim or Vim 8. If you are using an OS with Vim pre-installed, the system Vim might be too old (see vim --version).

This plugin supports Windows, macOS, and Linux.

In addition to Neovim or Vim, vim-markdown-composer requires a distribution of Rust with cargo. Check out the Rust installation guide.

vim-markdown-composer officially targets the latest version of stable Rust.

Installation

Use whatever plugin manager you like. If you aren't familiar with plugin managers, I recommend vim-plug.

vim-plug

Here's an example of managing installation with vim-plug:

function! BuildComposer(info)
  if a:info.status != 'unchanged' || a:info.force
    if has('nvim')
      !cargo build --release --locked
    else
      !cargo build --release --locked --no-default-features --features json-rpc
    endif
  endif
endfunction

Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') }

Vundle

In your .vimrc:

Plugin 'euclio/vim-markdown-composer'

Once you have installed the plugin, close Vim/Neovim then (on Linux):

$ cd ~/.vim/bundle/vim-markdown-composer/
# Vim
$ cargo build --release --no-default-features --features json-rpc
# Neovim
$ cargo build --release

Dein.vim

call dein#add('euclio/vim-markdown-composer', { 'build': 'cargo build --release' })

Other plugin managers

You should run cargo build --release in the plugin directory after installation. Vim support requires the json-rpc cargo feature.

If you use the above snippet, everything should be taken care of automatically.

Plugin Options

By default, vim-markdown-composer will open a new browser tab with the rendered preview. This can be prevented by setting the following in your Vim configuration:

let g:markdown_composer_autostart = 0

Documentation

:help markdown-composer, or check out the doc directory.

Acknowledgments

This plugin is inspired by suan's vim-instant-markdown.

This plugin was built with aurelius, a Rust library for live-updating Markdown previews.

More Repositories

1

fm

Small, general purpose file manager built with GTK4.
Rust
178
star
2

aurelius

A complete solution for previewing markdown written in Rust.
Rust
87
star
3

mdpls

Markdown Preview Language Server
Rust
49
star
4

robco-term

A recreation of the hacking mini-game from Fallout 3 and Fallout: New Vegas written in Rust using ncurses.
Rust
37
star
5

vim-nocturne

A dark colorscheme for vim
Vim Script
13
star
6

hunspell-sys

Rust bindings for the hunspell C API
Rust
10
star
7

vimrc

My settings for vim
Vim Script
9
star
8

llvm-gbz80

LLVM with a Game Boy Z80 Assembly Backend (WIP/ABANDONED)
C++
8
star
9

msgpack-rpc-rust

msgpack-RPC implementation for Rust
Rust
7
star
10

chip-lang

A Domain-specific language for chiptune.
Scala
6
star
11

gitignore.vim

Vim plugin that adds the entries in a .gitignore file to 'wildignore'.
Vim Script
4
star
12

xi-aurelius

Markdown preview for xi-editor
Rust
3
star
13

nourishbot

Slack integration that parses and posts the daily Nourish Menu at athenahealth Watertown
Rust
2
star
14

apply-license

Automatically apply licenses to your projects
Rust
2
star
15

spellbound

Bindings to your friendly neighborhood spellchecker.
Rust
2
star
16

fbfs

CS137 Final Project -- Facebook Filesystem
C++
1
star
17

auto-gif

Artificial Intelligence Final Project - Fall 2013
Python
1
star
18

ips

Parser for the IPS patch format.
Rust
1
star
19

scala-lambda

A lambda calculus parser written in Scala.
Scala
1
star
20

dotfiles

Obligatory configuration repository
Shell
1
star
21

media-bugger

University Hacker Olympics 2013 project
JavaScript
1
star
22

circus-charlie

Objectdraw implementation of the classic "Circus Charlie" video game
Java
1
star
23

learnalanguage

Learn Java with Java
Java
1
star