[Geany-devel] Default Snippets
Colomban Wendling
lists.ban at xxxxx
Sun Dec 4 00:10:18 UTC 2011
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
[C]
if=...
else=...
[C++=C]
try=...
[Java=C++]
[PHP=C++]
[C#=C++]
[Javascript=C++]
...
[Python]
if=...
else=...
[HTML]
table=...
Needs to be implemented, but a first though make me think it'd make
easier to have/configure per-filetype snippets.
What do you think?
> I'll collate suggestions, patches etc then commit.
Why keep an empty [Haskell] section?
Cheers,
Colomban
More information about the Devel
mailing list