Skip to content

gera2ld/coc-reveal

Repository files navigation

coc-reveal

Transform your Markdown to slides powered by reveal.js.

This is an extension for coc.nvim.

Installation

First, make sure coc.nvim is started.

Then install with the Vim command:

:CocInstall coc-reveal

Usage

Open a Markdown, and execute:

:CocCommand reveal.it

An HTML file with the same basename as the Markdown file will be created and opened in your default browser.

Key mappings

There is no default key mapping, but you can easily add your own:

" Create slides from the whole file
nmap <Leader>r <Plug>(coc-reveal-it)
" Create slides from the selected lines
vmap <Leader>r <Plug>(coc-reveal-it-v)

Commands

It is also possible to add a command to create slides.

command! -range=% RevealIt CocCommand reveal.it <line1> <line2>

Now you have the :RevealIt command to create slides, either from the whole file or selected lines.

Front matter

You can change the default options in front matter:

---
title: The title of my slides
author: Me
---