Sublime Forum

Doxygen support (esp. for CSS)

#1

I am trying to implement the guidelines of Idiomatic CSS 1 while working on a project. But I’m having trouble writing comments in the Doxygen style in CSS (or SCSS, LESS, etc.), e.g.:

/**
 * Short description using Doxygen-style comment format
 *
 * The first sentence of the long description starts here and continues on this
 * line for a while finally concluding here at the end of this paragraph.
 */

Sublime’s indentation does not play nice at all with this format, chiefly because the subsequent asterisks are only indented by 1 space. Is there any package or configurtion that eases writing in this comment style? (I am not looking for snippets, I can write these myself.) I didn’t find anything that looks interesting, but I thought there might be something something inside one of the programming packages I’m not aware of.

Thanks,
Alex

0 Likes

#2

I use the “DocBlockr” package to document all of my code.
Once installed you can configure it through the “Preferences -> Package Settings -> DocBlockr” menu and you can use it by typing:

/**[press tab here]

And it will fill out as many details as it can for you and leave you to do the rest.
Pressing enter also automatically inserts an asterisk with 1 space of indentation.
I don’t know how well it works with CSS though.

0 Likes

#3

Thank you, this is exactly what I was looking for!

The plugin supports ST3, which I forgot to mention I’m using, and it works great in CSS (and SCSS, etc.). Note: You actually press enter rather than tab after /** to expand the comment block.

To round off support for Idiomatic CSS comments, I threw together a couple of snippets for sections and sub-sections. I’m sure other people have made these before, but for future stumblers of this post, here are mine: github.com/alehandrof/sublime-s … r/Snippets

Alex

0 Likes