[Geany-Users] sharing snippets between two file types
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.
> 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
> 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?
> Thanks for any help!
> Users mailing list
> Users at lists.geany.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users