alias feature #124

Open
MarcWeber opened this Issue Jun 18, 2013 · 10 comments

Comments

Projects
None yet
6 participants
Collaborator

MarcWeber commented Jun 18, 2013

Often snippets get renamed, so we should think about introducing an alias feature, or allow many keys to trigger a snippet.

One use case is:
honza/vim-snippets#196

Collaborator

MarcWeber commented Jun 18, 2013

I also notified SirVer about how he thinks about aliases.

@UncleBill UncleBill referenced this issue in honza/vim-snippets Jun 18, 2013

Closed

Add missing semicolon #196

Collaborator

MarcWeber commented Jun 18, 2013

One possible implementation is here:
https://github.com/Shougo/neosnippet.vim/blob/master/doc/neosnippet.txt
I like that those snippets have an head

Should we work on common extensible snippet syntax ?

SirVer commented Jun 18, 2013

This has never been requested for UltiSnips so I am kinda meh. It would be easy enough to implement though and the use case from the merge request seems valid.

That said people would still need to clear() the trigger they don't like. So I am still meh :)

Collaborator

MarcWeber commented Jun 18, 2013

Thinking about it again eventually making "snippet rewriting" on the fly easy is a better way to solve "all" of such cases. See hints in other issue. For "renaming" cases alias may still be useful - keeping it open for that reason

Collaborator

ajzafar commented Jun 19, 2013

This shouldn't be too hard to implement, but I'm not sure I understand the use case. I don't see any use for it outside of a name change in a snippet repository, which to me seems like a fairly limited use case. Maybe I'm alone in this, but I've always thought of snippets as a personal part of one's dotfiles, with the repositories being a nice starting point. Though I'm not entirely against this, I've always thought that one of SnipMate's strengths is its simplicity.

@MarcWeber, what do you mean by "snippet rewriting"?

SirVer commented Jun 19, 2013

@ajzafar I share your opinion about snippets being something very personal, so I share your opinion of this feature. But it is easy to implement, so I am meh :)

kassio commented Jul 16, 2013

I'd like alias feature too.

Sometimes, trying to be faster than I really am, I don't type the snippet last key, like: cl<tab> instead of cla<tab>, aliases could help me in this cases.

907th commented Dec 20, 2013

+1

dechimp commented Oct 26, 2014

agreed. This would be really great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment