[Geany-devel] Default Snippets

Matthew Brush mbrush at xxxxx
Sun Dec 4 00:53:30 UTC 2011


On 12/03/2011 04:10 PM, Colomban Wendling wrote:
> Hey Lex -- and sorry for the delay.
>
> Le 24/11/2011 03:36, Lex Trotman a écrit :
>> Hi All,
>>
>> There are problems with the default snippets applying to all
>> documents.  It is not possible to add<snippet><tab>  in a document
>> even though the snippet is irrelevant to that filetype.
>>
>> A recent conversation on the ML showed problems with the Haskell do
>> snippet and shortly after I hit the problem adding "if<tab>" in a text
>> document (Murphy I guess).
>>
>> Basically having language specific snippets in the default section is
>> just wrong.
>
> Agreed.
>
>> The current defaults are C or C++ specific so in
>> https://github.com/elextr/geany_stuff/raw/master/snippets.conf I moved
>> them there and to Java, but I understand that other languages may want
>> them as well so I decided to post here before committing.
>
> First thing when I look at the file: it looks terribly repetitive!
> Maybe something in the style of filetype's sections copying
> ([name=othername]) would help having all this clearer, ending up with
> something like
>

I had started working on filetype-specific snippets here:
https://github.com/codebrainz/geany/commit/9a635da79ecd9465c856ce9d02dd95c14c0cab35

This would let a `[snippets]` section be in the filetypes.* files and I 
think would support group copying like the `[styles]` section does.

It still needs some work, but it's a start.

Cheers,
Matthew Brush



More information about the Devel mailing list