kdheepak / panvimdoc

Write documentation in pandoc markdown. Generate documentation in vimdoc.
https://kdheepak.com/panvimdoc
MIT License
263 stars 15 forks source link

Improve script for manual use #40

Closed saccarosium closed 1 year ago

saccarosium commented 1 year ago

This PR make the following change:

  1. make the interpreter usr/bin/env bash to make it use wathever version the system has even installed in different places
  2. instead of having a wall off echos, uses the much cleaner EOF to cat
  3. make so the program exit without errors when display usage
  4. format code for better styling
  5. set default values if any value is given
kdheepak commented 1 year ago

Thanks for the PR! Wow, that’s a significant improvement.

Regarding default values, one reason I didn’t want to do that was because I wanted to catch bugs early on if I didn’t pass the correct argument. But this certainly helps users if they want to run the script directly. Is that what you are trying to use it for?

saccarosium commented 1 year ago

Is that what you are trying to use it for?

Yes, I use the script to bootstrap the documentation from a markdown file. Then, when I generated the docs, I prefer modifying the vimdoc manually because it is much more easy to make it look good.

The reason I think having default values is nice, is so you don't have to type a very long onliner to simply convert quickly a markdown document into a vimdoc.

kdheepak commented 1 year ago

Thanks for the PR!