[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: YAsnippet Emacs-Lisp Templates
From: |
Andy Stewart |
Subject: |
Re: YAsnippet Emacs-Lisp Templates |
Date: |
Thu, 25 Sep 2008 18:53:42 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Nordlöw <per.nordlow@gmail.com> writes:
> On 25 Sep, 10:26, Andy Stewart <lazycat.mana...@gmail.com> wrote:
>> >>>>> "Nordlöw" == Nordlöw <per.nord...@gmail.com> writes:
> Great!
>
> Is it possible to change the way these are are triggered (the keys I
> believe YAsnippet calls them)?
>
> I would like yasnippet to trigger on the real uses of them. For
> example
>
> "(defmacro " + TAB
> expands defmacro-statement.
>
> Thanks in advance,
> Nordlöw
Hi, Nordlöw.
I think YAsnippet's mode is like this.
KEYWORD + TAB ==> Template completion
And I think YAsnippet can't understand below mode:
KEYWORD + SPACE + TAB
Because YAsnippet completion template just when cursor behind KEYWORD.
If you make cursor and KEYWORD have a SPACE, YAsnippet can't completion
template.
I have read your another post about YAsnippet with hippie-expand.
I recommend you split the key binding of those two command.
I binding TAB yas/expand, and binding M-/ hippie-expand.
So yas/expand don't conflict with hippie/expand.
BTW, hippie/expand is powerful, but not intuitionistic.
I use Company-mode to completion. It's a interactive completion style.
You can find it at:
http://nschum.de/src/emacs/company-mode/
Regards.
Andy.