tobyS / pdv

PHP Documentor for VIM - Generates PHP docblocks
161 stars 32 forks source link

Automatically indent parameters #17

Closed jacobwindsor closed 9 years ago

jacobwindsor commented 9 years ago

To comply with standards, it would be nice if doc blocks were automatically indented without the need of manually doing so.

E.g have this:

/* Description
*
* @param string  $aString   A short string.
* @param integer $anInteger A number.
* @param Object  $obj       Some kind of object.
*
* @returns mixed.
*/

Instead of what currently is returned:

/* Description
*
* @param string $aString A short string.
* @param integer $anInteger A number.
* @param Object $obj Some kind of object.
*
* @returns mixed.
*/

I apologize if there is a simple mustache function I can add to my templates but I simply have not been able to find any.

tobyS commented 9 years ago

You need to implement your own Mustache function here to do the trick. If OK want to provide it to PDV, please file a pull request. Am 18.01.2015 13:30 schrieb "Jacob Windsor" notifications@github.com:

To comply with standards, it would be nice if doc blocks were automatically indented without the need of manually doing so.

E.g have this:

/* Description *

  • @param string $aString A short string.
  • @param integer $anInteger A number.
  • @param Object $obj Some kind of object. *
  • @returns mixed. */

Instead of what currently is returned:

/* Description *

  • @param string $aString A short string.
  • @param integer $anInteger A number.
  • @param Object $obj Some kind of object. *
  • @returns mixed. */

I apologize if there is a simple mustache function I can add to my templates but I simply have not been able to find any.

— Reply to this email directly or view it on GitHub https://github.com/tobyS/pdv/issues/17.

tobyS commented 9 years ago

Closing this issue since no pull request was filed.

ianchanning commented 7 years ago

I have a workaround for this using the Tabular plugin that I documented in the StackOverflow answer, but it's far from perfect.