Open sencer opened 8 years ago
I think pdf.js is the easiest way for PDF preview and it should be a new plugin as nyaovim-pdf-preview
.
I want to make it but I'm working on making NyaoVim more stable.
About pandoc, I don't know because I'm not using pandoc. But child_process
module is available in JavaScript and it is possible to execute pandoc
command. It is executed in JavaScript context and does not block Neovim.
Perhaps then, there might be a variable like g:markdown_preview_command
that is executed in the child_process
module. I have seen some modules wrapping also pandoc, but I am not experienced with node, and not sure if they would do the job.
Are you supposing that the command accepts file contents to stdin and outputs html to stdout? If so, I think I can add the variable to configure. If not, could you please describe more about the spec of the variable?
Yes, pandoc
accepts stdin
, and writes to stdout
by default. So cat some.md|pandoc
will output proper html.
It would be nice, though, to be able to use commandline arguments, like cat some.md|pandoc -F pandoc-citeproc
.
Even better would be pandoc -F pandoc-citeproc some.md
, since several pandoc
related stuff, like panzer
can write to stdout
but do not read stdin
as input.
Would be awesome if it worked with pandoc --and perhaps also displays pdf.