vim-markdown-composer


Ⅰ. 插件描述

An asynchronous markdown preview plugin for Vim and Neovim.

Ⅱ. 基本信息

创建日期:  2015-07-17
使用用户:  88
Github星:  424
插件作者:  Andy Russell

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'euclio/vim-markdown-composer'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'euclio/vim-markdown-composer'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'euclio/vim-markdown-composer'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/euclio/vim-markdown-composer

Ⅳ. 文档说明

# 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

  1. Vim support requires the json-rpc cargo feature.

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

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.

添加新评论