Closed assafmendelson closed 10 months ago
Yeah, I like it. This is especially handy if microsoft/PTVS#758 is done too.
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?
can this be considered under code snippets?
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
for now sublime can do this, works perfectly! :)
I like the idea, but we should have the ability to disable it too.
Upvote +1, I would definitely love this in PTVS.
Upvote :)
I'm going to move this issue to vscode-python; it has more chance of getting traction there first.
Just FYI for those who are interested, there's a 3rd party extension that provides that: https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring
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 """