Suggestion: Change `.` to `..`
BalduinLandolt opened this issue · 7 comments
I'm really fond of this extension, by far the nicest python snippet pack I'm aware of.
However, there is one issue for me:
When I write docstrings, I often end a sentence with a period, and start a new line afterwards. This means, that I hit . and then enter a lot.
With the snippets enabled, this results in intellisense suggesting self on typing . and me accepting it with enter. I end up with lots of code like this:
def some_function():
"""Some functionself
This function does somethingself
"""
passClearly, this is not exactly desirable. And I somehow can't imagine myself being the only one with this issue.
Would it be an option, to rename the self-snippet from . to ... It wouldn't be much more typing effort to get self, and it would prevent this problem from happening.
I'm experiencing the same issue. Makes writing docstrings really hard
@Gonzalo933 as a workaround, I ended up locating the snippets on my file system, and simply removing the self snippet. Should be easy enough, and makes life a lot better. :)
@Gonzalo933 as a workaround, I ended up locating the snippets on my file system, and simply removing the
selfsnippet. Should be easy enough, and makes life a lot better. :)
I also ended up following your approach. Thank you for the extension @cstrap!
I just found this extension and it's annoying me enough that I'll just submit a PR for the change and @cstrap can just merge it in if they want.
I opened #14, but now that I think about it, .. will still encounter the same issue. Maybe it should be changed to just s? The first . will still cause this popup to show, and hitting "enter" will still invoke the snippet autocomplete. We should probably avoid overloading the . character anyway since it has such a significant meaning in Python when writing code in it in general.
@BalduinLandolt @Gonzalo933 thoughts on that?
@macintacos you're absolutely right... I didn't think that through. s makes more sense.
Thanks for the PR, I hope it gets accepted!
@macintacos I agree, s makes more sense