Support docstring templates / generate docstrings #5287
Replies: 11 comments
-
Yeah, I like it. This is especially handy if microsoft/PTVS#758 is done too. |
Beta Was this translation helpful? Give feedback.
-
I'm sceptical of this feature if it is always on. I do not generally like IDE writing a piece of code on its own when I am not asking it to do so explicitly (even if it is just a docstring). Do you think it will be better, perhaps, if it could be triggered by a tab button or if it could have a switch in settings to prevent it from running automatically when so desired? |
Beta Was this translation helpful? Give feedback.
-
can this be considered under code snippets? |
Beta Was this translation helpful? Give feedback.
-
I don't think VS code snippets are sufficiently context-aware to pull off something like this. What this reminds me of actually is GhostDoc: https://www.youtube.com/watch?t=21&v=xeZqoCGcHSU |
Beta Was this translation helpful? Give feedback.
-
for now sublime can do this, works perfectly! :) |
Beta Was this translation helpful? Give feedback.
-
I like the idea, but we should have the ability to disable it too. |
Beta Was this translation helpful? Give feedback.
-
Upvote +1, I would definitely love this in PTVS. |
Beta Was this translation helpful? Give feedback.
-
Upvote :) |
Beta Was this translation helpful? Give feedback.
-
I'm going to move this issue to vscode-python; it has more chance of getting traction there first. |
Beta Was this translation helpful? Give feedback.
-
Just FYI for those who are interested, there's a 3rd party extension that provides that: https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring |
Beta Was this translation helpful? Give feedback.
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
Provide auto fill of docstring.
The idea would be that if I type """ right at a docstring position (file, class method), it would generate a proper template for it.
A simple example would be to start typing """ right after def f(a): and it would immediatly expand it to:
def f(a):
"""
:param a
:return
"""
Beta Was this translation helpful? Give feedback.
All reactions