vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

Built-in executors don't display #71

Closed fncll closed 11 years ago

fncll commented 11 years ago

As I read the docs, ,pdf should create and display a PDF file. The pdf file does indeed get created, but it does not get opened/displayed. How can I have that (and the html executor) display?

fmoralesc commented 11 years ago

Does the command version (:PandocPdf!) work? What OS are you working on?

fmoralesc commented 11 years ago

Also, the default mappings won't open the file by default. This is a mistake in the documentation. You should add a custom mapping, possibly to execute the command mentioned above.

fncll commented 11 years ago

:PandocPdf! gives me an error that the ! isn't allowed.

However, PandocPdfOpen creates the PDF and opens it. So I have mapped that, though it uses the default PDF viewer. The command below selects Acrobat.

I am running Max OS X Lion

Meant to add, that this command also works for me, though it is perhaps not the most efficient way to go about things:

!pandoc -f markdown -o %:r.pdf %:r.md && open -a /Applications/Adobe\ Acrobat\ X\ Pro/Adobe\ Acrobat\ Pro.app/ %:r.pdf<CR>
fmoralesc commented 11 years ago

I see. I was slightly confused, because I use an experimental fork of vim-pandoc (it's not yet feature par with vim-pandoc, though it has most of the things) where PandocPdf supports the bang variant.

I'm also running linux only, so I'm not really knowledgeable with what's available for OSX. The -a argumen for open is something we might want to support, now that I see it.

dsanson commented 11 years ago

I take it you don't want Acrobat Pro to be your default PDF viewer? I have my default PDF viewer set to Skim, and open respects that.

Also, you should be able to use open -a Adobe\ Acrobat\ Pro instead of providing the full path.

Rather than supporting the -a argument for open on OS X, we could consider letting the user specify a custom launch command, with or without arguments.

dsanson commented 11 years ago

I fixed the documentation, so it no longer says that ,pdf will display the PDF.

dsanson commented 11 years ago

I'm closing this issue and opening a new issue regarding the ability to specify a custom launch command.