derekwyatt / vim-scala

My work on integration of Scala into Vim - not a ton here, but useful for me.
http://derekwyatt.org
Apache License 2.0
1.09k stars 144 forks source link

Configure asterisk alignment in multiline comments to match scaladoc recommendation #129

Closed mjp4 closed 8 years ago

mjp4 commented 8 years ago

Adds an option g:scala_scaladoc_indent = 1 to enable comments using the official Scaladoc style.

/**
  * Scaladoc comment with g:scala_scaladoc_indent = 1
  */

/**
 * Doc comment with g:scala_scaladoc_indent = 0 or not set.  This is the current behaviour
 */

Referenced in https://github.com/derekwyatt/vim-scala/issues/116

ches commented 8 years ago

Does this behave okay if you start the comment on the first line, the /** one? That's pretty common in projects that use this style. If formatting comments with gq behaves poorly in that case it may be hard to work around Vim's behavior for that, not sure.

Finally, please add the info to the vimdoc in doc/scala.txt, that's more import than the README IMO.

mjp4 commented 8 years ago

It behaves fine with the comment on the first line. I have made all the improvements you suggested and tested them. I have combined all the changes into a single commit.

ches commented 8 years ago

Thanks @mjp4, sorry about the delay in reviewing!

mjp4 commented 8 years ago

Thanks :-)