abeleinin / papyrus

📜 Papyrus: Pandoc integration for automatic file conversion in Vim!
MIT License
65 stars 0 forks source link

Feature request: do without the templates #1

Closed euglevi closed 1 year ago

euglevi commented 1 year ago

Hello, first of all thank you for the nice plugin! I had my own version of this plugin as a simple function in the config but this is much nicer.

I wonder if you would be willing to allow for the possibility of having no custom template at all in the conversion procedure. This is because I usually do not use any custom template. Furthermore, at the moment pandoc is looking for the template in the neovim "plugged" directory while I use "lazy".

abeleinin commented 1 year ago

Thank you, I'm glad you enjoy the plugin!

Templates are now optional, and I added a new variable g:papyrus_pandoc_args if you had custom pandoc arguments you used to set in the command you were running. The directory to the templates should also work now for any plugin manager.

Let me know if you have any other issues!

euglevi commented 1 year ago

Thank you! Now the plugin has become very usable! I do not have any issues anymore, just a recommendation for other two possible features: a) allow for a custom folder for the output rather than considering only the same folder as the markdown file, b) allow for different output than pdf with an argument to the commands.

abeleinin commented 1 year ago

I just added both of those features! Output folder paths can be set using g:papyrus_output_path with the format /path/to/folder/. Also, the functions :PapyrusCompile, :PapyrusAutoCompile, and :PapyrusStart have an optional argument that you can specify the output format with. For example, running :PapyrusCompile html will output an .html file. If you have anymore features or issues feel free to ask!