From: andrea <andrea.crotti.0@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: couple of simple yasnippet questions
Date: Sat, 16 Jan 2010 19:28:44 +0100 [thread overview]
Message-ID: <m1vdf1x5sz.fsf@gmail.com> (raw)
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...
--8<---------------cut here---------------start------------->8---
#!$$envvar $$(cdr (assoc major-mode execlists))
--8<---------------cut here---------------end--------------->8---
- 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?
This is the snippet.
--8<---------------cut here---------------start------------->8---
# -*- 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 \)
--8<---------------cut here---------------end--------------->8---
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?
Thanks
next reply other threads:[~2010-01-16 18:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-16 18:28 andrea [this message]
2010-01-17 14:25 ` couple of simple yasnippet questions Glauber Alex Dias Prado
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=m1vdf1x5sz.fsf@gmail.com \
--to=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.