Ⅰ. 插件描述
Github markdown previewing straight from your shell.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ianks/octodown'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ianks/octodown'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ianks/octodown'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ianks/octodown
Ⅳ. 文档说明
# :octocat: octodown
Ever wanted to easily preview what your markdown would look like exactly on
Github? Ever wanted to do that from inside of a Terminal?
Octodown uses the same parsers and CSS that Github uses for their markdown
- Github markdown styling looks beautiful, so it is Octodown's
- goal to reproduce it as faithfully as possible.

Features
:new: Edit your markdown like a boss with LiveReload.
octodown README.md
Uses the same markdown parsers and CSS as Github for true duplication.
- Yes emojis are included. :smiling_imp:
- Fast.
octodownuses native parsers to ensure performance. Multiple CSS styles.
octodown --style atom README.md- The
githubmarkdown (default) - The
atomtext editor markdown
Properly parses
STDIN.cat README.md | octodown --stdin
Installation
_Requirements_: Ruby >= 2.0
- Install
icu4candcmake:
- Mac:
brew install icu4c cmake pkg-config - Apt:
sudo apt-get install -y libicu-dev cmake pkg-config ruby-dev
- Install octodown:
- If you have a non-system Ruby (_highly recommended_):
gem install octodown - Else:
sudo gem install octodown
Usage in VIM (_optional_):
Use asyncrun.vim:
" Plug 'skywind3000/asyncrun.vim' in your vimrc or init.nvim :AsyncRun octodown % " or, run whenever a mardown document is opened autocmd FileType markdown :AsyncRun octodown %- Use Dispatch and add this to
your ~/.vimrc:
" Use octodown as default build command for Markdown files
autocmd FileType markdown let b:dispatch = 'octodown %'- Caveat: make sure you follow the directions on the Dispatch README.md and
make sure that the correct version of Ruby (the one which as Octodown
install as a Gem), is used.
Usage
- Keeping it simple (choose your files from a menu):
octodown
- Markdown preview styling:
octodown --style atom README.md
- Unix lovers:
echo '# Hello world!' | octodown --raw --stdin > index.html
Notes
- With
--stdin, octodown will readSTDINuntilEOFis reached.
- In order to work with this mode, type what you want into the input, then press
Ctrl-Dwhen finished.
Contributing
- Fork it ( https://github.com/ianks/octodown/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Run the test suite (
bundle exec rake) - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request