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] Update existing docblock #68

Open
jakebathman opened this issue Oct 31, 2017 · 4 comments
Open

[Request] Update existing docblock #68

jakebathman opened this issue Oct 31, 2017 · 4 comments

Comments

@jakebathman
Copy link

jakebathman commented Oct 31, 2017

One of my most-used Sublime plugins was DoxyDoxygen, and a great feature of that was alt+Q to update a method's docblock.

There are a few aspects to this feature:

  1. alt+Q would add a docblock to a method if one wasn't there before, allowing the user to tab through all of the placeholder fields (see Figure 1).
  2. If some of the placeholders are filled in, but others still exist, alt+Q will allow the user to tab through remaining placeholders again (see Figure 2).
  3. if the method signature or return type have changed, alt+Q will amend the docblock, retaining any portions that haven't changed (see Figure 3).
  4. Docblock formatting is fixed on-demand (see Figure 4).

I haven't looked to see how they accomplish these things in the DoxyDoxygen plugin, but we can definitely work to bring some of that functionality to vscode.

Examples

All examples below are triggered using alt+Q

Figure 1

Adding docblock to method
2017-10-31_11-11-15

Figure 2

Updating existing docblock placeholders
2017-10-31_11-13-54

Figure 3

Updating existing docblock with a changed method signature
2017-10-31_11-18-02

Figure 4

Fixing any issues with docblock formatting, including wrapping and intending long descriptions
2017-10-31_11-20-32

@jens1o
Copy link
Contributor

jens1o commented Oct 31, 2017

That's awesome!

@neild3r
Copy link
Owner

neild3r commented Mar 24, 2018

I'm certainly keen on getting some of this in. It's something I've been meaning to do for a while. I think the first one is just to add any missing param and return data and then leave everything else.

@Morgy93
Copy link

Morgy93 commented Apr 27, 2018

@bland-industries
Copy link

bland-industries commented Jul 28, 2020

any movement on this? Especially the formatting part

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

No branches or pull requests

5 participants