Ⅰ. 插件描述
A vim plugin and cli tool to generate vim helpfile from markdownⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'mklabs/vim-markdown-helpfile'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'mklabs/vim-markdown-helpfile'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'mklabs/vim-markdown-helpfile'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/mklabs/vim-markdown-helpfile
Ⅳ. 文档说明
# markdown-helpfile
Generate vim helpfiles from markdown
:h help-writing -> http://vimdoc.sourceforge.net/htmldoc/helphelp.html#help-writing
Synopsis
The bin/vim-helpfile script is a simple script parsing streaming
markdown to output the according vim helpfile.
You may npm link repo or install the tarball with -g option.
$ cat readme.md | markdown-helpfile
*markdown-helpfile.txt* Generate vim helpfiles from markdown
|markdown-helpfile| markdown-helpfile
|markdown-helpfile-Synopsis| Synopsis
markdown-helpfile *markdown-helpfile*
Generate vim helpfiles from markdown
Synopsis *markdown-helpfile-Synopsis*
The `bin/vim-helpfile` script is a simple script parsing streaming
markdown to output the according vim helpfile.
>
$ cat readme.md | markdown-helpfile
<
vim:tw=78:ts=8:ft=help:norl:Or maybe
$ cat readme.md | markdown-helpfile > doc/myplugin.txt
$ vim doc/myplugin.txtvim plugin
This tool can also be used as a vim plugin. The plugin itself is a basic
wrapper to the node script previously described.
Using pathogen
$ cd ~/.vim/bundle
$ git clone git://github.com/mklabs/vim-markdown-helpfile.git
$ cd vim-markdown-helpfile && npm installIt provides a single command :MarkdownToHelpfile, only on markdown buffer type.
What it does:
- convert the whole markdown document as vim helpfile
- change filetype from markdown to
help(set ft=help)
The command also accepts a range, so you may convert only a small part of your
markdown file. To see how it goes. Should it be useful.
That's pretty much all it does..