pandoc integration for kakoune
pandoc.kak provides a simple mean to use pandoc to convert documents written in markdown (e.g. Pandoc's markdown variant), LaTex, HTML and other formats.
pandoc.kak provides a way to preview markdown documents as pdf using zathura.
pandoc.kak provides syntax highlighting for latex at this point (experimental).
Add pandoc.kak
to the plugin manager of your choise, put it into your
autoload or source it manually.
Then reload Kakoune config or restart Kakoune and run :plug-install
.
Using andreyorst/plug.kak
plug "basbebe/pandoc.kak" %{
# your config
}
Then reload Kakoune config or restart Kakoune and run :plug-install
.
hook global WinSetOption filetype=(asciidoc|fountain|html|latex|markdown) %{
require-module pandoc
}
pandoc.kak provides the following commands:
pandoc
-- Converts the current document with the pandoc options given as arguments. If no arguments are given, a pdf file will be produced.pandoc-preview
-- Creates a temporary pdf file next to the current buffer and opens it with zathura. Every time the document is saved, the preview is being updated. Takes pandoc options as arguments.pandoc-beautify
-- Beautifies the current buffer using Pandoc. Assumes buffer is markdown text.
Pandoc uses pandoc-options
to let you specify custom pandoc options
for the current buffer (or globally). Those options will always be
applied.
Example for an entry in kakrc
:
set-option global pandoc_options "-d default"
hook global WinSetOption filetype=(asciidoc|fountain|html|latex|markdown) %{
require-module pandoc
set-option global pandoc_options '-d default'
}
@@ Similar projects
- kakoune-livedown: Live preview markdown files as HTML in your browser
Pull requests are welcome.
Inspired by vim-pandoc