Hi,
I use snippets now for a while with C, but I've recently written a Python script and instinctively tried to complete simple statements like if, else, etc, but it got C-like statements. I think this is very annoying for everyone regular with C snippets falling on a language with a non C-like syntax.
I joined a little patch to add basis of Python snippets (if, else, elif, while…) in data/snippets.conf, but I think there is probably other languages needing this.
Regards, Colomban
On Tue, 25 Nov 2008 21:15:47 +0100, Colomban Wendling ban-ubuntu@club-internet.fr wrote:
Hey,
I use snippets now for a while with C, but I've recently written a Python script and instinctively tried to complete simple statements like if, else, etc, but it got C-like statements. I think this is very annoying for everyone regular with C snippets falling on a language with a non C-like syntax.
I joined a little patch to add basis of Python snippets (if, else, elif, while…) in data/snippets.conf, but I think there is probably other languages needing this.
I'm not really sure whether we should add snippets for every filetype user reporting. This might lead to a big snippets files with all its disadvantages (longer loading time, harder to maintain, ...). OTOH it might be indeed useful to have some more defaults like those for Python. So I'll add them with the note that we try to keep the default snippets short.
Regards, Enrico
Enrico Tröger a écrit :
On Tue, 25 Nov 2008 21:15:47 +0100, Colomban Wendling ban-ubuntu@club-internet.fr wrote:
Hey,
I use snippets now for a while with C, but I've recently written a Python script and instinctively tried to complete simple statements like if, else, etc, but it got C-like statements. I think this is very annoying for everyone regular with C snippets falling on a language with a non C-like syntax.
I joined a little patch to add basis of Python snippets (if, else, elif, while…) in data/snippets.conf, but I think there is probably other languages needing this.
I'm not really sure whether we should add snippets for every filetype user reporting. This might lead to a big snippets files with all its disadvantages (longer loading time, harder to maintain, ...). OTOH it might be indeed useful to have some more defaults like those for Python. So I'll add them with the note that we try to keep the default snippets short.
Regards, Enrico
Hi,
You're right and having predefined snippets for all those languages is not what I would mean. The only thing I think annoying is to have a wrong snippet completion for some languages. Perhaps limiting now global snippets to only languages known to use it is a way; i.e by being able to combine sections like [C,C++,Java] or so instead of [Default]. 'dunno if is it possible/easy? But OTOH, yes, I think snippets for Python are useful, and I think Python is a language enough common to consider having a good support for it. Thanks for committing my patch :)
Regards, Colomban