-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Create snippets from editor selection #26706
Comments
fyi @jrieken |
I like, had similar ideas the other day |
I was an iOS developer and now turned to be a web front end developer, so same idea came from Xcode using experience. |
Agreed. Would make snippets even more approachable and friendly. I never have enough time to sit down and define a code snippet (even though it's only a few lines), but I can definitely see myself converting some code I've typed a million times in to a snippet by clicking my mouse a few times. |
there actually exists an extension for this: https://marketplace.visualstudio.com/items?itemName=dafanasev.snippetier |
Another option is using this extension to create the snippet bodies. Allows you to go back later and add to existing snippets. See command |
This'd make VS Code much more powerful for me, I don't currently use snippets mostly due to lack of this functionality 🙏 I'll try the extensions recommended here, but I'd argue it'd be better if users were able to create their own easily without an extension. |
@jrieken How is the status here, are you guys still interested in a solution inside of vscode or are the listed extensions the way to go? :) |
I personally would love the right click > create snippet functionality. Definitely still interested in this solution. |
will it ever land?... |
We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding, and happy coding! |
Please do reconsider, this would make writing and using snippets a breeze. |
I find it just plain daft that this doesn't exist. I have to manually create an XML file in order to create a snippet. Welcome to 1990! |
In the edit mode, I think it would be better if user take right mouse button click to define a custom code snippet.
One of the situations would be like this:
The user can select multiple line of the code and click right mouse button, then popup a menu and select "convert to code snippet" or something else.
All in all, we want a simple and fast way to create custom code snippet
The text was updated successfully, but these errors were encountered: