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

Feature request: a way to remove or ignore snippets for a certain trigger #214

Closed
ajzafar opened this issue Oct 26, 2015 · 4 comments
Closed

Comments

@ajzafar
Copy link
Collaborator

ajzafar commented Oct 26, 2015

From @fvisin in #65:

+1 I would also like this option implemented in the original snipmate.

My solution for the time being is to fork https://github.com/honza/vim-snippets and remove the . snippet. The best for me would be to have an configuration option in snipmate to ignore some snippets. Do you think it could be feasible?

@ajzafar
Copy link
Collaborator Author

ajzafar commented Oct 26, 2015

This is a very reasonable request. I hope to have some time this week to make it happen.

@fvisin
Copy link

fvisin commented Oct 26, 2015

That's great, thank you!

ajzafar added a commit that referenced this issue Oct 28, 2015
In a snippets file, `snippet!! foo` will remove that trigger from the
current lookup. Any future snippets defined with that trigger will still
exist. That is, load order is important.

See #214.
@ajzafar
Copy link
Collaborator Author

ajzafar commented Oct 28, 2015

Just added support for this in 7f91de3. A line like snippet!! foo will remove all previously loaded foo snippets. Note that this means load order matters, so you may want to be removing snippets in ~/.vim/after/snippets/python.snippets for example.

@ajzafar ajzafar closed this as completed Oct 28, 2015
@fvisin
Copy link

fvisin commented Oct 28, 2015

Great job, thank you!

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

No branches or pull requests

2 participants