[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: couple of simple yasnippet questions

From: Glauber Alex Dias Prado
Subject: Re: couple of simple yasnippet questions
Date: Sun, 17 Jan 2010 12:25:31 -0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

andrea <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]