Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Auto @author value #115

Open
Larandar opened this issue Dec 4, 2012 · 11 comments
Open

[REQUEST] Auto @author value #115

Larandar opened this issue Dec 4, 2012 · 11 comments

Comments

@Larandar
Copy link

Larandar commented Dec 4, 2012

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.

@spadgos
Copy link
Owner

spadgos commented Dec 5, 2012

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]}
 */

@spadgos spadgos closed this as completed Dec 5, 2012
@Larandar
Copy link
Author

Larandar commented Dec 5, 2012

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.

@spadgos
Copy link
Owner

spadgos commented Dec 5, 2012

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.

@Larandar
Copy link
Author

Larandar commented Dec 5, 2012

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" : "larandar@false.com"

Then @author will expend to @author Adrien "Larandar" Dudouit-Exposito <larandar@false.com>

Unlike default @author [author] <[email]>

( Sorry , my English is maybe worst that my explication )

@spadgos spadgos reopened this Dec 5, 2012
@brunowego
Copy link

Is possible add the additional tags after @return?

@spadgos
Copy link
Owner

spadgos commented May 11, 2013

@brunobatista you can now with the jsdocs_extra_tags_go_after option.

@LeCanardNoir
Copy link

jsdocs_extra_tags

this thing don't work with me ??? some one help

@wpsmith
Copy link

wpsmith commented May 6, 2014

@spadgos when I use jsdocs_extra_tags to auto-populate the author like this: // jsdocs_extra_tags = ['This is a cool function', '@author nickf <nickf@email.com>', '@version ${1:version}'] the regex removes the entry altogether because there is currently no apparent way to escape @. Or am I mistaken?

@ljyf5593
Copy link

@Larandar I understand your needs,How do you solve?

@robbieaverill
Copy link

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.

@robbieaverill
Copy link

@spadgos bump - any plans to implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants