Awesome! Thank you.
DocBlockr for Javascript, PHP and CoffeeScript
Awesome plugin! Really missed this, most of the big IDEās got this already and now its in sublime to!
Great job !
[quote=āxaviā]Great job!!
Typing @ inside a docblock show all my snippets but no JSDoc supported ones. Iām using Sublime Text 2 build 2131 on Ubuntu Linux[/quote]
Hey Xavi,
Iām running on Ubuntu as well, but canāt recreate your error. I do have an issue tracker on github if you (or anyone) has any problems. github.com/spadgos/sublime-jsdocs/issues
Hi all,
Iāve just released an update to the JSDocs package:
From the changelog
[quote]v1.3.0, 5 November 2011
Improvements to handling of single-line comments
Functions beginning with is or has are assumed to return Booleans
Consolidated settings files into Base File.sublime-settings.** If you had configured your settings in jsdocs.sublime-settings, please move them to the Base File settings.**
Setting jsdocs_extend_double_slashes controls whether single-line comments are extended.
Pressing tab in a docblock will tab to match the description block of the previous tag. Use jsdocs_deep_indent to toggle this behaviour.[/quote]
Hereās a demonstration of that last bullet point:
[code]/**
- @param {String} foo Lorem ipsum dolor sit amet
- |<>
*/
ā becomes
/**
- @param {String} foo Lorem ipsum dolor sit amet
-
|
*/[/code]
Please do give it a try and let me know if you find any problems or have any feature requests by submitting an issue on the Github tracker: github.com/spadgos/sublime-jsdocs/issues
Cheers!
Hey guys,
Donāt mean to be spamming, but Iāve released version 2.0.0 of JSDocs which now officially supports PHP. Iāve edited the post at the start of this thread, but the readme on the github repo has the most info.
Give it a try and let me know how it is!
Thank you spadgos,
It works well, itās a real pleasure to not type thousands of ā*ā
Iāve just released an update, now at version 2.1.0. From the changelog:
- Added a command to join lines inside a docblock which is smart to leading asterisks Press Ctrl+J to join lines
- Variable types are guessed from their name.
is
andhas
are assumed to be Booleans, andcallback
,cb
,done
,fn
andnext
are assumed to be Functions. - You can now define your own patterns for mapping a variable name to a type. See the README for documentation about the format
- Autocomplete works better now.
@
will also insert the ā@ā character, allowing you to add any tag you like, even if it isnāt in the autocomplete list. - Added the full set of PHPDoc tags.
I thought Iād give this thread a bump since Iāve just added support for CoffeeScript.
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
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.
Was looking for something exactly like this. It actually does more than I even thought I wanted, too. Thanks so much!
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!
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.
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.
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
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.
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 or // instead of /**.
Thereās been some improvements over the last few months. Supported languages now include: Javascript, PHP, ActionScript, CoffeeScript, Java, Objective C, C and C++. For full changes, check out the changelog: github.com/spadgos/sublime-jsdo ā¦ HISTORY.md
What should I do when docblockr fails to do anything after installing it?
I have had it installed in ST2 on my Linux Mint box. I also have a VM running on the same Linux box and running Windows 7 there. I installed ST3 there and then the plugin for docblockr. I canāt get the plugin to work in either place. I could have sworn it used to work on the Linux ST2 but that was months ago that I tried.
I should add this is all using Javascript files.
I donāt know where to get help with this other than here. I find no posted articles on this topic.