sublime-jsdocs
sublime-jsdocs copied to clipboard
[REQUEST] Auto @author value
Since I hope you don't have twenty-four personality it will be very useful to have an option for auto-completing @author tag with your name.
You can use jsdocs_extra_tags
to do that.
jsdocs_extra_tags
(Array.String) An array of strings, each representing extra boilerplate comments to add to functions. These can also include arbitrary text (not just tags).
// jsdocs_extra_tags = ['This is a cool function', '@author nickf', '@version ${1:version}']
/**<<enter>>
function foo (x) {}
/**
* [foo description]
* This is a cool function
* @author nickf
* @version [version]
* @param {[type]} x [description]
* @return {[type]}
*/
I already know about jsdocs_extra_tags
and this is not what I whant.
jsdocs_extra_tags
apply each time I open a DocBlock and my coding convention are : @author
and @version
when creating a class, @author
IF adding method in SOMEONE ELSE class.
I see. So, check the docblock at the top of the file to see if it contains an @author
tag which doesn't match yours and add the tag then? If so, then I think that's way out of scope for this plugin.
No no, just preference that permit to define the default "author" and default "email":
If I define "js_author_name" : "Adrien \"Larandar\" Dudouit-Exposito"
and "js_author_email" : "[email protected]"
Then @author
will expend to @author Adrien "Larandar" Dudouit-Exposito <[email protected]>
Unlike default @author [author] <[email]>
( Sorry , my English is maybe worst that my explication )
Is possible add the additional tags after @return?
@brunobatista you can now with the jsdocs_extra_tags_go_after
option.
jsdocs_extra_tags
this thing don't work with me ??? some one help
@spadgos when I use jsdocs_extra_tags
to auto-populate the author like this: // jsdocs_extra_tags = ['This is a cool function', '@author nickf <[email protected]>', '@version ${1:version}']
the regex removes the entry altogether because there is currently no apparent way to escape @
. Or am I mistaken?
@Larandar I understand your needs,How do you solve?
Hi @spadgos - firstly, nice work on the plugin - it's super useful! Now I totally agree with what @Larandar is asking for. I don't necessarily want the @author
tag to be added to every single doc block, but if I type @author
and press tab for auto-completion I'd love it if it could automatically insert a default value defined in user settings. It would be incredibly useful, and relevant since everyone would be using their own terminal to develop.
@spadgos bump - any plans to implement this?