From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Stewart Newsgroups: gmane.emacs.help Subject: Re: YAsnippet Emacs-Lisp Templates Date: Thu, 25 Sep 2008 18:53:42 +0800 Organization: Bentium Ltd. (CN99) Message-ID: <87iqsk7ayx.fsf@manatee.domain> References: <87myhwaaxh.fsf@manatee.domain> <31d2385f-2763-4f49-832e-f5ff89e270ea@f63g2000hsf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1222342941 3893 80.91.229.12 (25 Sep 2008 11:42:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Sep 2008 11:42:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 25 13:43:17 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KipFY-0002UO-KI for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Sep 2008 13:43:12 +0200 Original-Received: from localhost ([127.0.0.1]:47902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KipEW-0006QU-Ga for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Sep 2008 07:42:08 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsgate.cuhk.edu.hk!news.cn99.com!manatee.domain!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 222.212.132.232 Original-X-Trace: news.cn99.com 1222340879 23297 222.212.132.232 (25 Sep 2008 11:07:59 GMT) Original-X-Complaints-To: usenet@news.cn99.com Original-NNTP-Posting-Date: Thu, 25 Sep 2008 11:07:59 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:FGEMbiDjWnZZdMlwEHpMBSYULwk= Original-Xref: news.stanford.edu gnu.emacs.help:162718 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58062 Archived-At: Nordlöw writes: > On 25 Sep, 10:26, Andy Stewart wrote: >> >>>>> "Nordlöw" == Nordlöw   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.