## Vim-reveal ### By:[farseer He](https://github.com/farseer90718) ### Hosted on:[github](https://github.com/farseer90718/vim-reveal) ### Introductions * This vim plugin is made mainly for converting markdown files to [reveal.js](https://github.com/hakimel/reveal.js) presentations. * The details of [markdown syntax](http://daringfireball.net/projects/markdown/syntax). * Works better with [vim-regionsyntax](https://github.com/farseer90718/vim-regionsyntax)

### Install & Tweak 1. Use your favorite vim package managing plugin(such as vundle/pathogen/neobundle). 2. Clone [reveal.js](https://github.com/hakimel/reveal.js) somewhere. 3. Add something like this to your vim configuration file. ```vim let g:reveal_root_path = 'your-reveal.js-path' " '$HOME/reveal.js/' will be used if not specified. let g:reveal_default_config = { \'fname' : 'reveal', " The name of generated html file will be 'reveal.html' \'key1': 'value1', \'key2': 'value2', \ ...} " Default options for reveal.js. ```

### Usage 1. Edit your markdown file. 2. _:RevealIt_ will help you open the generated html file. 3. _:!Your-favorite-browser %_ will show the presentation in your browser. ### What it looks like? 1. heads #### h4 ##### h5 ###### h6 2. github flavored code blocks with syntax highlighting. ``` c #include int main(int argc, char const* argv[]) { puts("hello, world!"); return 0; } ``` 3. tables
| Head1 | Head2 | Head3 | Head4 | Head5 | Head6 | Head7 | | ----- | ----- | ----- | ----- | ----- | ----- | ----- | | aaaaa | bbbbb | ccccc | ddddd | eeeee | fffff | 00000 | | aaaaa | bbbbb | ccccc | ddddd | eeeee | fffff | 00000 | | aaaaa | bbbbb | ccccc | ddddd | eeeee | fffff | 00000 | ## Sections To add sections each of which means a single page in the presentation,you can do something like this:
(_Here the '^' means a start of new line instead of the actual character._) ``` ^ The content of section 1. ^ The content of section 2. ... ``` This will be converted to: ``` html ``` ## Nested sections If you add this: ``` ^ The content of section 1.1. ^ The content of section 1.2. ... ``` ### Something like this will happen. ## Section options You can change the background color of a certain section using: ``` ^ ``` ## Section options Also the transition and background transition ...
For more section options,please refer to the documents of reveal.js. ``` ^ ```

Plain section

You may want to enable mathjax with it.
Don't panic!

Use this:
('secp' means section with plain html)



^
$$
\LaTeX
\\ \\
\left(\begin{array}{|c|c|c|}
x_{11} & x_{12} & \ldots
\\ x_{21} & x_{22} & \ldots
\\ \vdots & \vdots & \ddots
\end{array} \right)
$$

Feels like this.

$$ \LaTeX \\ \\ \left(\begin{array}{|c|c|c|} x_{11} & x_{12} & \ldots \\ x_{21} & x_{22} & \ldots \\ \vdots & \vdots & \ddots \end{array} \right) $$

Plain section

Other cool stuffs supported by reveal.js

All of these could be added to a 'secp' section

  1. any type
  2. of view
  3. fragments

grow

shrink

roll-in

fade-out

highlight-red

highlight-green

highlight-blue

## reveal.js configurations You can specify several options with Meta tags at the top of the markdown file like this: ``` ``` For all the available options,please check the documents of reveal.js.

Thanks for watching!

Original markdown file for this presentation.