Skip to content
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

Add snipmate style rust snippets #355

Closed
wants to merge 1 commit into from
Closed

Add snipmate style rust snippets #355

wants to merge 1 commit into from

Conversation

lpil
Copy link
Collaborator

@lpil lpil commented May 1, 2014

Hello all! I've converted dcbishop's ultisnip rust snippets to the snipmate style.

Thanks,
Louis

@SirVer
Copy link
Collaborator

SirVer commented May 1, 2014

That seems silly to me....

Do we really want all ultisnips snippets duplicated in snipmate? Or should we delete them then in ultisnips? Or should we suggest to people to switch engine?

Am 01.05.2014 um 20:51 schrieb Louis notifications@github.com:

Hello all! I've converted dcbishop's ultisnip rust snippets to the snipmate style.

Thanks,
Louis

You can merge this Pull Request by running

git pull https://github.com/lpil/vim-snippets master
Or view, comment on, or merge it at:

#355

Commit Summary

Add snipmate style rust snippets
File Changes

A snippets/rust.snippets (125)
Patch Links:

https://github.com/honza/vim-snippets/pull/355.patch
https://github.com/honza/vim-snippets/pull/355.diff

Reply to this email directly or view it on GitHub.

@lpil
Copy link
Collaborator Author

lpil commented May 1, 2014

There's no snippet plugin that supports the ultisnip format that doesn't have external dependencies (i.e. python), so I think there's certainly a good reason to have the snipmate format snippets too. This wouldn't be the first set of duplicated snippets.

If you were to only have one set, I think it would make more sense to have the snipmate style ones, as that would serve a larger proportion of the user-base.

edit:
Here's a thought- I'm not familiar with ultisnip, is it possible for that plugin to read both styles of snippets at the same time? If so, I can remove the ultisnip snippets that can be completely replaced by the snipmate style ones, leaving only the ones with additional ultisnip specific functionality.

Cheers,
Louis

@SirVer
Copy link
Collaborator

SirVer commented May 1, 2014

There's no snippet plugin that supports the ultisnip format that doesn't have external dependencies (i.e. python), so I think there's certainly a good reason to have the snipmate format snippets too. This wouldn't be the first set of duplicated snippets.

I find this a poor argument, as python is no external, but a build dependency and the only OS in the world where it does not come preinstalled (windows) is hardly a factor in the vim user base. But oh well.

If you were to only have one set, I think it would make more sense to have the snipmate style ones, as that would serve a larger proportion of the user-base.

That is only correct because UltiSnips also reads the snipMate snippets though. There is no data for active user base except github stars - and they never decay when users move on, so it is hard to judge which plugin is really used more.

Moving all snippets that do not use the UlitSnips advanced features down to snipMate would be a possibility, but it also rather limits the chances that advanced features will be used in the future. Having them in both files means they will diverge over time. Given these choices I think diverging is better than limiting development. Following this logic I think your PR should be merged. In the sense of 'modernizing' snippets for vim I think your PR should not be merged as UltiSnips is strictly better than snipMate.

I wonder what other collaborators think?

@lpil
Copy link
Collaborator Author

lpil commented May 1, 2014

If having both sets of snippets in the same repo is going to cause these kind of debates, why are they kept together at all?

Expecting no duplication or drift when the two plugins have different capabilities is being unrealistic, and attempting to make this happen will result in either one portion of the community losing out on their plugin's extra features, or the other losing out on the snippets in the repository altogether.

@SirVer
Copy link
Collaborator

SirVer commented May 2, 2014

If having both sets of snippets in the same repo is going to cause these kind of debates, why are they kept together at all?

Main reason is that hindsight is always easier than foresight :). Also, when I was first asked to merge the UltiSnips snippets here, the idea was to make UltiSnips snipMate compatible and deprecate snipMate. So for me that was a kind of transition idea and I made UltiSnips read snipMate snippet files. However, I am not sure if deprecating snipMate is still in the scope of its maintainers.

Expecting no duplication or drift when the two plugins have different capabilities is being unrealistic, and attempting to make this happen will result in either one portion of the community losing out on their plugin's extra features, or the other losing out on the snippets in the repository altogether.

So, what do you think is the better of the solutions then? Having them in snipMate and UltiSnips or only in snipMate? @honza I am also interested what you think is the prudent action to take.

@lpil
Copy link
Collaborator Author

lpil commented May 2, 2014

I think that unless snipmate drops in popularity and stops being maintained, the only option is to continue to have sources of snippets in both formats, whether together in one repository, or split into two.

The difficulty with splitting into two is that this change has to be communicated to the userbase, as one group is going to need to go through the faff of updating their vim config. Is there a good way to do this?
Additionally, if the repository were to split, we would have even more duplication, as snipmate snippets that currently serve both plugins would need to be re-written in the ultisnip format.

Cheers,
Louis

@honza
Copy link
Owner

honza commented May 5, 2014

Sorry for the delay.

I think that it would make sense to deprecate snipmate altogether in favor of UltiSnips. UltiSnips could provide some short-term guarantees about backwards compatibility for snipmate snippets. However, I'm not in a position to make that call. @garbas @MarcWeber thoughts?

As far as this repository itself is concerned, I think it makes sense to accept PRs that fix old snipmate snippets if users are so inclined; but we should only accept new snippets for the UltiSnips platform.

Does that make sense? I'm just throwing out some thought and I'm open to other ideas.

@lpil lpil closed this May 5, 2014
@lpil lpil reopened this May 5, 2014
@lpil
Copy link
Collaborator Author

lpil commented May 5, 2014

Sorry about that, I pressed the wrong button.

Should snipmate snippets be no longer supported in this repo, I'm more than happy to maintain a new one that does. However, I'm not experienced with vim plugins, so it'd be great if I could have a call with someone, and have a quick chat about this plugin if we go down this path. It looks very simple, so it shouldn't be a problem.

It might also be worth re-naming this repo. Perhaps vim-ultisnip-snippets

Cheers,
Louis

@MarcWeber
Copy link
Collaborator

I've added comments to the README that sinpmate is not deprecated yet because there are still users only having VimL support and its still improved by Adnan. Having UltiSnips and snipmate snippets sucks - but makes it easy to copy paste snippets. There is much more which could be improved. At least there is one place to share snippets this way. If you have strong reasons to split create an issue so that we can discuss that topic.

@MarcWeber
Copy link
Collaborator

I've pushed your patch dropping dropping a trailing space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants