[Geany-Users] sharing snippets between two file types

Lex Trotman elextr at xxxxx
Thu Sep 12 07:35:35 UTC 2013


On 12 September 2013 17:18, Sean Noble <sean.noble.72 at gmail.com> wrote:

> Hi Geany Users,
>
> I am looking for a way to share the same snippets in two file types A
> and B. Ideally allowing each file type to have shared and unique
> snippets, but just sharing the same ones would be OK too.
>

There is no way of sharing snippets without some repetition.



>
> In snippets.conf I have a list of [HTML] file snippets. I would like
> to use those snippets in [PHP] files as well.
>
>
Makes sense.


> I could just copy the snippets from [HTML] to [PHP] but that seems
> redundant, and means having to add new snippets in two places. I could
> also put all the snippets under [Default], and that would work pretty
> well, but then all the snippets would be available in all file types.
>

What you can do is define the common snippets under the [special] group and
then the language sections where you want them to be available can refer to
the special snippet.  Look at how say brace_open is used in the standard
snippets.conf file.



>
> I was wondering if there is a trick like [HTML, PHP] as a shared
> header (that appears not to work). Maybe something I can set in
> filtypes.html or filetypes.php to treat them as the same file type?
>

No.


Cheers
Lex

>
> Thanks for any help!
>
> Cheers,
> Sean
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20130912/a7a50d6f/attachment.html>


More information about the Users mailing list