Skip to content

Latest commit

 

History

History
200 lines (159 loc) · 4.76 KB

vim-reveal.md

File metadata and controls

200 lines (159 loc) · 4.76 KB

Vim-reveal

Hosted on:github

Introductions



Install & Tweak

  1. Use your favorite vim package managing plugin(such as vundle/pathogen/neobundle).
  2. Clone reveal.js somewhere.
  3. Add something like this to your vim configuration file.
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
  1. github flavored code blocks with syntax highlighting.
#include <stdio.h>
int main(int argc, char const* argv[])
{
    puts("hello, world!");
    return 0;
}
  1. 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.)

^<!--sec1-->

The content of section 1.

^<!--sec2-->

The content of section 2.
...

This will be converted to:

<!--
<section data-markdown >
<script type="text/template">
The content of section 1.
</script>
</section>
<section data-markdown >
<script type="text/template">
The content of section 2.
</script>
</section>
-->

Nested sections

If you add this:

^<!--sec5.1-->

The content of section 1.1.

^<!--sec5.2-->

The content of section 1.2.
...

Something like this will happen.

Section options

You can change the background color of a certain section using:

^<!--sec6.1 bg='#654321'-->

Section options

Also the transition and background transition ...
For more section options,please refer to the documents of reveal.js.

^<!--sec6.2 bg='#002b36' tr='linear' bgtr='slide'-->

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:

<!--Meta author:'your name' title:title-->
<!--Meta theme:'night' transition:'zoom'-->
<!--Meta width:900 height:1200-->

For all the available options,please check the documents of reveal.js.

Thanks for watching!