It seems like Geany offers 2 ways of helping complete what you're in the middle of typing:
1. Autocomplete construct -- where you hit Tab and get completion of the preceding construct, which is defined in your autocomplete.conf file, and
2. Complete word -- where you hit Ctrl-Space and get completion of the preceding partial word, which is a symbol somewhere else in the file which Geany knows about via its built-in understanding of tags.
Is that correct?
On Thu, 18 Oct 2007 15:19:33 -0400, "John Gabriele" jmg3000@gmail.com wrote:
It seems like Geany offers 2 ways of helping complete what you're in the middle of typing:
- Autocomplete construct -- where you hit Tab and get completion of
the preceding construct, which is defined in your autocomplete.conf file, and
- Complete word -- where you hit Ctrl-Space and get completion of the
preceding partial word, which is a symbol somewhere else in the file which Geany knows about via its built-in understanding of tags.
Is that correct?
No. I just realized this issue today, nice accident ;-). I think we should separate these two features more clearly because they are two different kinds of helpers. The question for me is, how. You know, English isn't my mother tongue and right now I have no idea how to improve it by keeping its meaning. Any ideas?
Regards, Enrico
On 10/18/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 18 Oct 2007 15:19:33 -0400, "John Gabriele" jmg3000@gmail.com wrote:
It seems like Geany offers 2 ways of helping complete what you're in the middle of typing:
- Autocomplete construct -- where you hit Tab and get completion of
the preceding construct, which is defined in your autocomplete.conf file, and
- Complete word -- where you hit Ctrl-Space and get completion of the
preceding partial word, which is a symbol somewhere else in the file which Geany knows about via its built-in understanding of tags.
Is that correct?
No. I just realized this issue today, nice accident ;-). I think we should separate these two features more clearly because they are two different kinds of helpers. The question for me is, how. You know, English isn't my mother tongue and right now I have no idea how to improve it by keeping its meaning. Any ideas?
No, because I don't know what the incorrect thing is to which you're referring. :)
My first stab at it, though, would be to clearly separate what you mean by:
1. autocomplete vs. complete, and 2. word vs. symbol vs. construct
Then explain how, with autocomplete, you don't need to do anything, since either a popup will guide you while you're typing, or else the completed text will just show up automatically (like when "xml tags autocomplete" is enabled).
And then tell the user specifically what Geany can and cannot do. That is:
Completion features:
* word complete -- no, not yet * symbol complete -- yes, using built-in tag info. Usage: Ctrl-Space. * construct complete -- yes, using ~/.geany/autocomplete.conf. Usage: Tab. * xml tag complete -- no
Autocomplete:
* word autocomplete -- no, not yet * symbol autocomplete -- yes. Preferences --> Editor tab --> Autocomplete --> Symbol autocompletion. Usage: popup comes up. * construct autocompletion -- yes. Preferences --> Editor tab --> Autocomplete --> Construct autocompletion. Usage: Tab... hmm... XXX * xml tag autocomplete -- yes
Is that above summary correct? If so, it sounds like "Construct autocomplete" is misnamed, since it's not automatic (you have to hit Tab to get it).
---John
On 10/18/07, John Gabriele jmg3000@gmail.com wrote:
- xml tag autocomplete -- yes
Edit:
* xml tag autocomplete -- yes. Usage: it just happens while you type.
On Thu, 18 Oct 2007 16:44:41 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/18/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 18 Oct 2007 15:19:33 -0400, "John Gabriele" jmg3000@gmail.com wrote:
It seems like Geany offers 2 ways of helping complete what you're in the middle of typing:
- Autocomplete construct -- where you hit Tab and get completion
of the preceding construct, which is defined in your autocomplete.conf file, and
- Complete word -- where you hit Ctrl-Space and get completion
of the preceding partial word, which is a symbol somewhere else in the file which Geany knows about via its built-in understanding of tags.
Is that correct?
No. I just realized this issue today, nice accident ;-). I think we should separate these two features more clearly because they are two different kinds of helpers. The question for me is, how. You know, English isn't my mother tongue and right now I have no idea how to improve it by keeping its meaning. Any ideas?
No, because I don't know what the incorrect thing is to which you're referring. :)
I wasn't clearly enough about what I wanted to say: I was talking about the used terms not the functionality itself.
Regards, Enrico
On 18/10/07 21:01:28, Enrico Tröger wrote:
On Thu, 18 Oct 2007 15:19:33 -0400, "John Gabriele" jmg3000@gmail.com wrote:
It seems like Geany offers 2 ways of helping complete what you're
in
the middle of typing:
- Autocomplete construct
- Complete word
I think we should separate these two features more clearly because they are two different kinds of helpers. The question for me is, how. You know, English isn't my mother tongue and right now I have no idea how to improve it by keeping its meaning. Any ideas?
I think autocompletion is when the editor suggests matches for a partial word, and construct completion is used for completing things like if, for, etc. But now that construct completion is configurable, it is different as the trigger word is replaced rather than expanded. So perhaps we should use a new term for configurable completion - now it's not necessarily completing anything.
Regards, Nick
On Fri, 19 Oct 2007 13:09:41 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 18/10/07 21:01:28, Enrico Tröger wrote:
On Thu, 18 Oct 2007 15:19:33 -0400, "John Gabriele" jmg3000@gmail.com wrote:
It seems like Geany offers 2 ways of helping complete what you're
in
the middle of typing:
- Autocomplete construct
- Complete word
I think we should separate these two features more clearly because they are two different kinds of helpers. The question for me is, how. You know, English isn't my mother tongue and right now I have no idea how to improve it by keeping its meaning. Any ideas?
I think autocompletion is when the editor suggests matches for a partial word, and construct completion is used for completing things like if, for, etc. But now that construct completion is configurable, it is different as the trigger word is replaced rather than expanded. So perhaps we should use a new term for configurable completion - now it's not necessarily completing anything.
I agree. The terms "auto completion of constructs" and "contruct completion" are more or less leftovers from before where constructs like if, for, while and so on where really auto completed once you hit space after one of them. Then we changed it to have it less automatically, so you had to hit TAB to actually trigger it. Now, Nick is right it is something else and should be renamed. So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
Regards, Enrico
On 10/19/07, Enrico Tröger enrico.troeger@uvena.de wrote:
So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
My guess is that lots of folks will use them for things other than code, so maybe just "snippets" would do; as in, "Hit Tab to activate the snippet for the preceeding bit of text". Then you'd find yourself referring to "filetype-specific snippets" for those different sections in the config file.
Also, I'm guessing you'd want to rename ~/.geany/autocomplete.conf to ~/.geany/snippets.conf, as well as purge any mentions of "autocomplete construct" from the manual, replacing them appropriately.
---John
On Fri, 19 Oct 2007 14:44:01 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/19/07, Enrico Tröger enrico.troeger@uvena.de wrote:
So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
My guess is that lots of folks will use them for things other than code, so maybe just "snippets" would do; as in, "Hit Tab to activate the snippet for the preceeding bit of text". Then you'd find yourself referring to "filetype-specific snippets" for those different sections in the config file.
But why not? IMO it fits the actual behaviour more than auto completion.
Also, I'm guessing you'd want to rename ~/.geany/autocomplete.conf to ~/.geany/snippets.conf, as well as purge any mentions of "autocomplete
This is quite inconvenient, so we should have done this before the 0.12 release.
Regards, Enrico
On 10/20/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Fri, 19 Oct 2007 14:44:01 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/19/07, Enrico Tröger enrico.troeger@uvena.de wrote:
So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
My guess is that lots of folks will use them for things other than code, so maybe just "snippets" would do; as in, "Hit Tab to activate the snippet for the preceeding bit of text". Then you'd find yourself referring to "filetype-specific snippets" for those different sections in the config file.
But why not? IMO it fits the actual behaviour more than auto completion.
The actual behaviour is, of course, to expand a small piece of text into a larger piece -- regardless of whether or not it's code. So, really, neither "code snippets" nor "snippets" are names that fit actual behaviour. I just thought "snippets" would be simpler, and more general sounding.
Also, I'm guessing you'd want to rename ~/.geany/autocomplete.conf to ~/.geany/snippets.conf, as well as purge any mentions of "autocomplete
This is quite inconvenient, so we should have done this before the 0.12 release.
Yup.
---John
On Sat, 20 Oct 2007 12:54:03 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/20/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Fri, 19 Oct 2007 14:44:01 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/19/07, Enrico Tröger enrico.troeger@uvena.de wrote:
So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
My guess is that lots of folks will use them for things other than code, so maybe just "snippets" would do; as in, "Hit Tab to activate the snippet for the preceeding bit of text". Then you'd find yourself referring to "filetype-specific snippets" for those different sections in the config file.
But why not? IMO it fits the actual behaviour more than auto completion.
The actual behaviour is, of course, to expand a small piece of text into a larger piece -- regardless of whether or not it's code. So, really, neither "code snippets" nor "snippets" are names that fit actual behaviour. I just thought "snippets" would be simpler, and more general sounding.
Why doesn't fit snippets at all? I think it is good enough and I'm not really sure about your last sentence. You also suggest snippets or you are against? To me it sounds a bit contrary.
Regards, Enrico
Enrico Tröger a écrit :
On Sat, 20 Oct 2007 12:54:03 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/20/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Fri, 19 Oct 2007 14:44:01 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/19/07, Enrico Tröger enrico.troeger@uvena.de wrote:
So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
My guess is that lots of folks will use them for things other than code, so maybe just "snippets" would do; as in, "Hit Tab to activate the snippet for the preceeding bit of text". Then you'd find yourself referring to "filetype-specific snippets" for those different sections in the config file.
But why not? IMO it fits the actual behaviour more than auto completion.
The actual behaviour is, of course, to expand a small piece of text into a larger piece -- regardless of whether or not it's code. So, really, neither "code snippets" nor "snippets" are names that fit actual behaviour. I just thought "snippets" would be simpler, and more general sounding.
Why doesn't fit snippets at all? I think it is good enough and I'm not really sure about your last sentence. You also suggest snippets or you are against? To me it sounds a bit contrary.
Regards, Enrico
Hi,
Snippets have a different meaning for me : those of a TextMate like editor (InType, eTexteditor,Smultron,...), with fields where you can give default values, apply transforms and pos your cursor at the end. Type 'snippets' + Vim or Emacs, and you'll find these features too. So this term seems commonly used for pieces of text with dynamic replacements; that's not Geany behavior.
Kib.
On Mon, 22 Oct 2007 18:01:47 +0200, kib2 kib2@free.fr wrote:
Enrico Tröger a écrit :
On Sat, 20 Oct 2007 12:54:03 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/20/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Fri, 19 Oct 2007 14:44:01 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/19/07, Enrico Tröger enrico.troeger@uvena.de wrote:
So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
My guess is that lots of folks will use them for things other than code, so maybe just "snippets" would do; as in, "Hit Tab to activate the snippet for the preceeding bit of text". Then you'd find yourself referring to "filetype-specific snippets" for those different sections in the config file.
But why not? IMO it fits the actual behaviour more than auto completion.
The actual behaviour is, of course, to expand a small piece of text into a larger piece -- regardless of whether or not it's code. So, really, neither "code snippets" nor "snippets" are names that fit actual behaviour. I just thought "snippets" would be simpler, and more general sounding.
Why doesn't fit snippets at all? I think it is good enough and I'm not really sure about your last sentence. You also suggest snippets or you are against? To me it sounds a bit contrary.
Regards, Enrico
Hi,
Snippets have a different meaning for me : those of a TextMate like editor (InType, eTexteditor,Smultron,...), with fields where you can give default values, apply transforms and pos your cursor at the end. Type 'snippets' + Vim or Emacs, and you'll find these features too. So this term seems commonly used for pieces of text with dynamic replacements; that's not Geany behavior.
If I understand you right, you are talking about that what we call templates in Geany. So, any better idea for the current auto completion feature? I don't want to rename the template feature because IMO it fits very well and is there already for a very long time.
Regards, Enrico
On 10/22/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Sat, 20 Oct 2007 12:54:03 -0400, "John Gabriele" jmg3000@gmail.com wrote:
The actual behaviour is, of course, to expand a small piece of text into a larger piece -- regardless of whether or not it's code. So, really, neither "code snippets" nor "snippets" are names that fit actual behaviour. I just thought "snippets" would be simpler, and more general sounding.
Why doesn't fit snippets at all? I think it is good enough and I'm not really sure about your last sentence. You also suggest snippets or you are against? To me it sounds a bit contrary.
What I mean is, "snippet" is a handy little word that is useful not because it has a terribly well-defined meaning, but because it's slang-ey enough that we can assign to it a specific meaning for Geany. I think it's a good fit for use with this Geany feature. It would work well, mostly because people are already familiar with seeing it in other editors, and have a preconceived idea of what it probably does.
So, when I'd suggested using plain "snippets" instead of "code snippets", you'd stated, "IMO it fits the actual behaviour more than auto completion.". I think this is where there was confusion. I was agreeing with you about using the word "snippets" -- I just thought it would be better without the word "code" in front of it. :)
On Mon, 22 Oct 2007 14:53:34 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/22/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Sat, 20 Oct 2007 12:54:03 -0400, "John Gabriele" jmg3000@gmail.com wrote:
The actual behaviour is, of course, to expand a small piece of text into a larger piece -- regardless of whether or not it's code. So, really, neither "code snippets" nor "snippets" are names that fit actual behaviour. I just thought "snippets" would be simpler, and more general sounding.
Why doesn't fit snippets at all? I think it is good enough and I'm not really sure about your last sentence. You also suggest snippets or you are against? To me it sounds a bit contrary.
What I mean is, "snippet" is a handy little word that is useful not because it has a terribly well-defined meaning, but because it's slang-ey enough that we can assign to it a specific meaning for Geany. I think it's a good fit for use with this Geany feature. It would work well, mostly because people are already familiar with seeing it in other editors, and have a preconceived idea of what it probably does.
So, when I'd suggested using plain "snippets" instead of "code snippets", you'd stated, "IMO it fits the actual behaviour more than auto completion.". I think this is where there was confusion. I was agreeing with you about using the word "snippets" -- I just thought it would be better without the word "code" in front of it. :)
Ok, so finally we both like "snippets" more than "code snippets" and "auto completion" ;-).
Regards, Enrico
On Tue, 23 Oct 2007 16:07:30 +0200, Enrico Tröger enrico.troeger@uvena.de wrote:
On Mon, 22 Oct 2007 14:53:34 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/22/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Sat, 20 Oct 2007 12:54:03 -0400, "John Gabriele" jmg3000@gmail.com wrote:
The actual behaviour is, of course, to expand a small piece of text into a larger piece -- regardless of whether or not it's code. So, really, neither "code snippets" nor "snippets" are names that fit actual behaviour. I just thought "snippets" would be simpler, and more general sounding.
Why doesn't fit snippets at all? I think it is good enough and I'm not really sure about your last sentence. You also suggest snippets or you are against? To me it sounds a bit contrary.
What I mean is, "snippet" is a handy little word that is useful not because it has a terribly well-defined meaning, but because it's slang-ey enough that we can assign to it a specific meaning for Geany. I think it's a good fit for use with this Geany feature. It would work well, mostly because people are already familiar with seeing it in other editors, and have a preconceived idea of what it probably does.
So, when I'd suggested using plain "snippets" instead of "code snippets", you'd stated, "IMO it fits the actual behaviour more than auto completion.". I think this is where there was confusion. I was agreeing with you about using the word "snippets" -- I just thought it would be better without the word "code" in front of it. :)
Ok, so finally we both like "snippets" more than "code snippets" and "auto completion" ;-).
We should get a resolution for this. I still vote for "snippets".
Regards, Enrico
On 11/2/07, Enrico Tröger enrico.troeger@uvena.de wrote:
We should get a resolution for this. I still vote for "snippets".
It would seem that Kib's notion of "snippets", which he points out should allow you to TAB through and fill in multiple empty slots (or "placeholders") of the snippet, is the more general case of Geany's current behaviour, in which the only allowed number of slots is zero. :) I'm guessing it's possible that, in the future, Geany may allow more than zero slots, but either way, the feature can still be called "snippets".
---John
On 11/2/07, Enrico Tröger enrico.troeger@uvena.de wrote:
We should get a resolution for this.
One area that may lead to confusion is the name used for when you want to complete a symbol (like the name of a class or something). I suggest you specifically use the term "symbol completion" (rather than "autocomplete") for this feature.
That is, Geany always offers symbol symbol completion via Ctrl-Space, but you should be able to enable "automatic symbol completion" in the prefs, thus making Geany automatically pop up that list of choices while you're typing a symbol name that it recognizes.
I think the term "autocomplete" is best left reserved for cases where Geany adds characters to your file for you automatically while you type, such as:
1. XML tag autocompletion, and 2. Harold's idea of an option to have Geany automatically finish your opening quotes and brackets.
So, in the Preferences dialog, the Editor tab, it might look like:
**Autocomplete** [x] XML tag autocomplete [x] quote autocomplete [x] bracket autocomplete
**Other completion** [x] automatic symbol completion
---John
On Fri, 2 Nov 2007 16:53:57 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 11/2/07, Enrico Tröger enrico.troeger@uvena.de wrote:
We should get a resolution for this.
One area that may lead to confusion is the name used for when you want to complete a symbol (like the name of a class or something). I suggest you specifically use the term "symbol completion" (rather than "autocomplete") for this feature.
That is, Geany always offers symbol symbol completion via Ctrl-Space, but you should be able to enable "automatic symbol completion" in the prefs, thus making Geany automatically pop up that list of choices while you're typing a symbol name that it recognizes.
I think the term "autocomplete" is best left reserved for cases where Geany adds characters to your file for you automatically while you type, such as:
- XML tag autocompletion, and
- Harold's idea of an option to have Geany automatically finish your
opening quotes and brackets.
So, in the Preferences dialog, the Editor tab, it might look like:
**Autocomplete** [x] XML tag autocomplete [x] quote autocomplete [x] bracket autocomplete
**Other completion** [x] automatic symbol completion
I agree, sounds good to me. My idea for the lower part of the Editor tab: **Completions** [x] XML tag autocomplete [x] quote autocomplete [x] bracket autocomplete [x] automatic symbol completion Row of symbol completion list: ____
And instead of the current behaviour the row spin button won't be disabled if automatic symbol completion is disabled because the list still can be shown when using Ctrl-Space.
Regards, Enrico
On Sun, 4 Nov 2007 11:28:55 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
On Fri, 2 Nov 2007 16:53:57 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 11/2/07, Enrico Tröger enrico.troeger@uvena.de wrote:
We should get a resolution for this.
One area that may lead to confusion is the name used for when you want to complete a symbol (like the name of a class or something). I suggest you specifically use the term "symbol completion" (rather than "autocomplete") for this feature.
That is, Geany always offers symbol symbol completion via Ctrl-Space, but you should be able to enable "automatic symbol completion" in the prefs, thus making Geany automatically pop up that list of choices while you're typing a symbol name that it recognizes.
I think the term "autocomplete" is best left reserved for cases where Geany adds characters to your file for you automatically while you type, such as:
- XML tag autocompletion, and
- Harold's idea of an option to have Geany automatically finish
your opening quotes and brackets.
So, in the Preferences dialog, the Editor tab, it might look like:
**Autocomplete** [x] XML tag autocomplete [x] quote autocomplete [x] bracket autocomplete
**Other completion** [x] automatic symbol completion
I agree, sounds good to me. My idea for the lower part of the Editor tab: **Completions** [x] XML tag autocomplete [x] quote autocomplete [x] bracket autocomplete [x] automatic symbol completion Row of symbol completion list: ____
And instead of the current behaviour the row spin button won't be disabled if automatic symbol completion is disabled because the list still can be shown when using Ctrl-Space.
Finally I did the changes in SVN r2044. I'll open a new thread for details on this change.
Regards, Enrico
On 20/10/07 15:43:33, Enrico Tröger wrote:
On Fri, 19 Oct 2007 14:44:01 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/19/07, Enrico Tröger enrico.troeger@uvena.de wrote:
So my suggestion is to rename the current construct completion completely to e.g. "code snippets" or something else.
My guess is that lots of folks will use them for things other than code, so maybe just "snippets" would do; as in, "Hit Tab to
activate
the snippet for the preceeding bit of text". Then you'd find
yourself
referring to "filetype-specific snippets" for those different
sections
in the config file.
But why not? IMO it fits the actual behaviour more than auto completion.
I think either code snippets or snippets is OK. Alternatively maybe code templates. I see that they can be used for anything, but I would guess they are mainly used for code completion.
Also, I'm guessing you'd want to rename ~/.geany/autocomplete.conf
to
~/.geany/snippets.conf, as well as purge any mentions of
"autocomplete This is quite inconvenient, so we should have done this before the 0.12 release.
We could look for the snippets.conf files first, and if one can't be found, then check for the old autocomplete.conf files.
Regards, Nick
On Mon, 22 Oct 2007 12:46:38 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
Also, I'm guessing you'd want to rename ~/.geany/autocomplete.conf
to
~/.geany/snippets.conf, as well as purge any mentions of
"autocomplete This is quite inconvenient, so we should have done this before the 0.12 release.
We could look for the snippets.conf files first, and if one can't be found, then check for the old autocomplete.conf files.
Yepp, this is probably the best way at least for the next release but still unlovely.
Regards, Enrico