-
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 #349
Snippets #349
Conversation
Wow! This looks really good and you did it so fast too. Very nice! I have been testing it with the go.snippets and I have just a couple remarks: For very simple snippets like
the cursor is moved to the start of the word after the snippet is inserted but it should be moved to the end. For snippets like
where the cursor locations have to placeholders, an empty selection is created which isn't necessary and causes problems when at the end of the line with Those are the only problems I found. Now comes the question of what should the keybindings be, and where should the snippets be stored. |
I will have a look at those two issues might take a day or two... About the question where those snippets might get stored: Some kind of package management for plugins might be helpful. Including all packages and snippets within the binary might increase the file size more then needed for most users... |
* inserting snippets without a placeholder locates the cursor at the end of the snippet * fixed bug with selecting empty placeholders * added more commands
ok the bugs you've mentioned should be fixed. |
o_O |
MB, i'll add syntax-highlighting for snippet files |
I changed the way plugin help files works in the last commit so the Then you can register it in the lua code with AddRuntimeFile("snippets", "help", "help/snippets.md") Also I'm not sure if this plugin should be provided by default with all the snippets. Perhaps this should be the first third-party plugin? If that's the case then we need to add some sort of plugin manager. |
The new runtime file organization from your latest PR also means that other plugins can add their own snippets files with |
Hi, I've merged the master branch to keep this up to date and the plugin now reads the snippets from the runtime files as you said. (type |
Some kind of plugin manager would be great, since it would keep the binary small. |
I think I finally reached a state where the plugin is usable. (fix for #175)
What is currently missing: