From: Glauber Alex Dias Prado <smade4@gmail.com>
To: andrea.crotti.0@gmail.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: couple of simple yasnippet questions
Date: Sun, 17 Jan 2010 12:25:31 -0200 [thread overview]
Message-ID: <86wrzgn6zo.fsf@gmail.com> (raw)
In-Reply-To: <m1vdf1x5sz.fsf@gmail.com> (andrea's message of "Sat, 16 Jan 2010 19:28:44 +0100")
andrea <andrea.crotti.0@gmail.com> writes:
> I end up to define every day new snippets and it's wonderful, but I
> still have some problems when they become more complicated.
>
> - bang
> with this I would just like to insert the right bang line depending on
> the mode.
> This thing below doesn't work...
>
> #!$$envvar $$(cdr (assoc major-mode execlists))
no clue
>
> - latex matrix
> I have to write sometimes latex matrices, but normally I write them
> inside org-mode.
> Would it be possible to make the *matrix* snippet only available for
> latex and org-mode?
my guess is that you could make org-mode snippets on a sub-dir of
latex-mode snippets this way you would inherit all latex snippets
from org-mode.
> This is the snippet.
>
> # -*- mode: snippet -*-
> # name: matrix
> # key: matrix
> # possible improvement, compute the number of lines from the argument to array
> # --
> \left \(
> \begin{array}{${1:ccc}}
> ${2:v1 & v2} \\
> $0
> \end{array}
> \right \)
>
> A wonderful thing that it could do is creating as many lines as I
> define in the "ccc" part, any idea on how to do it?
no clue either but it would involve some elisp coding (i am not yet one
such coder), i guess its doable.
>
> Thanks
prev parent reply other threads:[~2010-01-17 14:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-16 18:28 couple of simple yasnippet questions andrea
2010-01-17 14:25 ` Glauber Alex Dias Prado [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86wrzgn6zo.fsf@gmail.com \
--to=smade4@gmail.com \
--cc=andrea.crotti.0@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.