Home Download Buy Blog Forum Support

DocBlockr for Javascript, PHP and CoffeeScript

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby Fannon on Mon Mar 05, 2012 10:55 am

Great Plugin!

One suggestion:
If I enter a "one Line comment" like // and I hit enter it will continue to add // to the next line. Most of the time (or always) I have to get rid of those, so they are not too helpful ;)

Usually if I need multiline comments I use /** oder /*. They work fine!

Greets,
Simon
Fannon
 
Posts: 18
Joined: Mon Aug 08, 2011 8:13 pm

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby spadgos on Tue Mar 06, 2012 9:33 am

Hey Fannon,

There is a configuration option for disabling that feature. Just set "jsdocs_extend_double_slash": false in your Base File.sublime-settings (or Preferences.sublime-settings if you're on the dev branch). The other option is to press Shift+Enter and it won't extend the comment.
spadgos
 
Posts: 121
Joined: Thu Oct 06, 2011 12:49 am

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby Fannon on Thu Mar 15, 2012 10:55 am

Thanks! Exactly what I wanted ;)
Fannon
 
Posts: 18
Joined: Mon Aug 08, 2011 8:13 pm

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby peppy on Wed Mar 21, 2012 4:03 am

Was looking for something exactly like this. It actually does more than I even thought I wanted, too. Thanks so much!
peppy
 
Posts: 52
Joined: Thu Aug 04, 2011 4:52 pm
Location: perth, australia

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby mpedrummer on Thu Mar 22, 2012 5:11 pm

As a feature request - more control over the whitespace, please!

The deep alignment is pretty close, but there's a few differences from what my company's code-sniffing will accept, namely that we don't align the first column with other tags. So, when there's @param and @return, this plugin's deep alignment puts two spaces after the @param, but the code sniffer wants just one.

Also, we do a newline after the descriptions, but no newline before the @return tag.

Really, this is awesome, though - not a big deal to fix those myself, and much better than typing out the whole thing!
mpedrummer
 
Posts: 23
Joined: Thu Mar 08, 2012 9:50 pm

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby spadgos on Tue Mar 27, 2012 10:51 pm

hey mpedrummer,

I believe that at least some of your requests are already implemented -- you just need to set a config variable. The docs are in the readme and all the options are documented at the bottom of that page.
jsdocs_align_tags (String) Whether the words following the tags should align. Possible values are 'no', 'shallow' and 'deep'

For backwards compatibility, false is equivalent to 'no', true is equivalent to 'shallow'
'shallow' will align only the first words after the tag. eg:

Code: Select all
@param    {MyCustomClass} myVariable desc1
@return   {String} foo desc2
@property {Number} blahblah desc3

'deep' will align each component of the tags, eg:

Code: Select all
@param    {MyCustomClass} myVariable desc1
@return   {String}        foo        desc2
@property {Number}        blahblah   desc3



I think you'd probably want "jsdocs_align_tags": false here.

For the spacing between sections, I've put that into an issue so I won't forget about it. :)
spadgos
 
Posts: 121
Joined: Thu Oct 06, 2011 12:49 am

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby mpedrummer on Wed Mar 28, 2012 2:10 pm

Thanks spagdos!

Unfortunately, all three settings aren't quite what we need - which may indicate we should change the code-sniffing standard! Deep alignment is closest - we do align columns, but only within the same tag, not across all tags like deep does. Actually, shallow aligns the first column across all tags, too. "No" means I have to manually align all the columns, which really isn't the end of the world.

I'm going to leave it on "no" for a few days, see what happens there.

Thanks
MPEDrummer
mpedrummer
 
Posts: 23
Joined: Thu Mar 08, 2012 9:50 pm

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby Grant on Mon Aug 06, 2012 7:31 pm

Anyone ventured into adapting this for C++ yet?
Grant
 
Posts: 68
Joined: Fri Jan 20, 2012 2:42 pm

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby rchl on Mon Aug 06, 2012 8:32 pm

Grant wrote:Anyone ventured into adapting this for C++ yet?

Is there some adapting needed for C++? I seem to be happy with how it works with C++ here. :)

EDIT: But it's probably because I haven't seen how it detects parameters and stuff in .js, for example. Until now. :)
rchl
 
Posts: 148
Joined: Fri Mar 04, 2011 11:02 pm

Re: DocBlockr for Javascript, PHP and CoffeeScript

Postby web559 on Thu Aug 16, 2012 10:47 pm

This is a beautifully done! Thanks, spadgos.

Is it possible to customize what string to begin tab-completion of the docblock with? I would love to be able to use doc<tab> or //<tab> instead of /**.
web559
 
Posts: 2
Joined: Thu Aug 16, 2012 10:42 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests