Ⅰ. 插件描述
vim plugin that use markdown and reveal.js to generate presentations.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'farseer90718/vim-reveal'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'farseer90718/vim-reveal'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'farseer90718/vim-reveal'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/farseer90718/vim-reveal
Ⅳ. 文档说明
vim-reveal
vim plugin that use markdown and reveal.js to generate presentations.
Installation
- Whatever the package managing plugin you are using.
- Download or clone reveal.js somewhere.
- Configuration
Vim configuration
let g:reveal_root_path = 'your-reveal.js-path' " '$HOME/reveal.js/' will be used if not specified.
let g:reveal_config = {
\'filename': 'reveal', " The name of generated html file will be 'reveal.html'
\'key1': 'value1',
\'key2': 'value2',
\ ...} " Default options for reveal.js.If no filename is given, the given title will be ascii-fied and used as filename. That's nicer than setting a global option.
Syntax
Besides default markdown syntax, you need something else to specify the sections each of which will take care of a single
page in the final presentation.
And you need something to customize the reveal.js options.
<!--Meta key1:value1 key2:value2 [...]--> // Options,these lines should be in the head of the file.
// The start of a markdown section.
<!--sec 1-->
// Secp means plain html section.In other words,markdown syntax is ignored(mainly for [MathJax](https://github.com/mathjax/mathjax)).
<!--secp 2.1-->
// The number after the decimal point means that this is a nested section.
<!--sec 2.2-->
// Section options.'bg' : 'background', 'tr' : 'transition', 'bgtr' : 'background-transition', 'bgrp' : 'background-repeat', 'bgsz' : 'background-size'.
<!--sec 3 bg='#123' tr='cube' bgtr='linear'-->Generate the html file
Use the :RevealIt command to generate the html file.
It accepts several options:
:RevealIt defaultopen generated file (same as:RevealIt):RevealIt newopen generated file in new window:RevealIt mdstay in markdown file