Best way to add Yasnippet to my tab-tab defun?

158 views
Skip to first unread message

Matthew Williams

unread,
Oct 21, 2009, 5:21:07 PM10/21/09
to smart-snippet and YASnippet
I use the following tab or complete function but it seems to disable
Yasnippet.

http://gist.github.com/215461

I've only been using Emacs for a short time now (currently in my first
week of pure Emacs use, no TextMate!).

What would be the most effective way to add yas/expand in the chain so
it tries:

Standard tab -> Yasnippet -> dabbrev-expand

Or if anyone has a better implementation, that would be great! Should
I be using hippie-expand perhaps?

Feel free to fork the gist and approve it! It would definitely be
appreciated.

Thanks!

Ryan McGeary

unread,
Oct 22, 2009, 8:51:40 AM10/22/09
to smart-snippet and YASnippet
Matthew,

smart-tab is a good start, but I would suggest an alternative smart-
tab that utilizes hippie-expand.

After configuring hippie-expand and defining smart-tab, you'll just
need to bind yasnippet's tab key to smart-tab.

Try something like this:
http://gist.github.com/215930

-Ryan

This version of smart-tab was copied from here:
http://www.emacswiki.org/emacs/TabCompletion

The gist above was composed of portions from my personal emacs
configuration:
http://github.com/rmm5t/dotfiles/tree/master/emacs.d/


On Oct 21, 5:21 pm, Matthew Williams <matthew.d.willi...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages