-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Snippets #175
Comments
@zyedidia if you are not working on this I would start implementing it... |
Sure. I recommend implementing it as a plugin because that feels more natural to me. I understand that the plugin system isn't so mature yet, so if you have any issues let me know. What do you think of implementing it as a plugin vs in the core? |
I think implementing it as plugin seems like a good idea but it might require some additions to core which could also benefit other plugins. If you have a look at the screenshot you've postet there is some kind of dropdrown which I would implement in the core which then might get populated by different plugins. which could also be used for various autocomplete plugins (which make also more sense as plugin...) |
Yeah, I think the behavior from the screenshot is much more advanced than necessary. The dropdown menu is from Vim's autocompletion and the variable completion is not really necessary. |
progress can be seen on my snippet branch |
Hi again, I'm making some good progress though I'm not sure if the current way of input handling is the right choice. @zyedidia would you mind to have a look and tell me what you're thinking before I continue? |
I'm not sure what you mean by "input handling" but I think it looks good. Just one note: the extension for snippets files should be Great progress 👍 . |
With "Input handling" I mean the last 2 changes with |
This is now finished thanks to @boombuler! You can install the snippets plugin using the new plugin manager with |
It would be nice to support snippets. The user would type a predefined pattern (defined for the current filetype), press a key, and it would expand into a large piece of code. This is meant for dealing with boilerplate. Here is an example of a Vim snippets plugin:
We can just use their predefined patterns from this repository.
Ref #174
The text was updated successfully, but these errors were encountered: