What if Geany would support the following:
A: Add opening and closing tags to a selection: 1. Select a word/row/section 2. Press ' 3. Geany transforms the selection into '<selection>' and expands the selection so you may add another one by a single keypress.
B: Add closing tag for opened tag 1. Start typing: echo ' 2. Geany adds the closing ' but the cursor stays in between: echo '<cursor>'
These would be useful for ', ", {, [, (, ` and maybe other characters(?)...
-H-
On 24/10/07 14:38:40, Harold Aling wrote:
What if Geany would support the following:
A: Add opening and closing tags to a selection:
- Select a word/row/section
- Press '
- Geany transforms the selection into '<selection>' and expands the
selection so you may add another one by a single keypress.
I'm not sure about this, when would you use it? Perhaps it's better to just insert the > character after < when typing the tag, like feature B.
B: Add closing tag for opened tag
- Start typing: echo '
- Geany adds the closing ' but the cursor stays in between: echo
'<cursor>'
These would be useful for ', ", {, [, (, ` and maybe other characters(?)...
It might be a nice feature, but it would need to be implemented carefully. E.g. checking that the cursor is not in a string or comment. Also sometimes you wouldn't want the behaviour at the start of a line or in front of some text on an existing line if you're programming.
Regards, Nick
On Fri, 26 Oct 2007 13:31:07 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/10/07 14:38:40, Harold Aling wrote:
What if Geany would support the following:
A: Add opening and closing tags to a selection:
- Select a word/row/section
- Press '
- Geany transforms the selection into '<selection>' and expands the
selection so you may add another one by a single keypress.
I'm not sure about this, when would you use it? Perhaps it's better to just insert the > character after < when typing the tag, like feature B.
B: Add closing tag for opened tag
- Start typing: echo '
- Geany adds the closing ' but the cursor stays in between: echo
'<cursor>'
These would be useful for ', ", {, [, (, ` and maybe other characters(?)...
It might be a nice feature, but it would need to be implemented carefully. E.g. checking that the cursor is not in a string or comment. Also sometimes you wouldn't want the behaviour at the start of a line or in front of some text on an existing line if you're programming.
If I'm not mistaken, I've seen either Gvim or Kate do this and it looked very handy to me.
Doen anyone else have an opinion about this? Or seen something like this in action?
-H-
Regards, Nick _______________________________________________ Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On Fri, 26 Oct 2007 15:06:15 +0200, Harold Aling h.aling@home.nl wrote:
On Fri, 26 Oct 2007 13:31:07 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/10/07 14:38:40, Harold Aling wrote:
What if Geany would support the following:
A: Add opening and closing tags to a selection:
- Select a word/row/section
- Press '
- Geany transforms the selection into '<selection>' and expands the
selection so you may add another one by a single keypress.
I'm not sure about this, when would you use it? Perhaps it's better to just insert the > character after < when typing the tag, like feature B.
B: Add closing tag for opened tag
- Start typing: echo '
- Geany adds the closing ' but the cursor stays in between: echo
'<cursor>'
These would be useful for ', ", {, [, (, ` and maybe other characters(?)...
It might be a nice feature, but it would need to be implemented carefully. E.g. checking that the cursor is not in a string or comment. Also sometimes you wouldn't want the behaviour at the start of a line or in front of some text on an existing line if you're programming.
If I'm not mistaken, I've seen either Gvim or Kate do this and it looked very handy to me.
Doen anyone else have an opinion about this? Or seen something like this in action?
I was working for a long time with Programmers Notepad (www.pnotepad.org) on Windows. It has a feature like this "Brace Completion" too and i was very satisfied with that. :) Also i used kate on Linux and this worked very good. But in Gedit for example this is not working as is should. When i want to put a string into quotes, i'm putting the cursor before the first char and type a ". This completes too so that i have to delete the completed " too. And thats very annoying. Just as an example how this should _not_ work... as Nick already said, this has to be implemented very carefully. But kate and pnotepad may be good sources to look for examples. :)
-H-
Regards, Nick _______________________________________________ Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
Regards, Dominic
On 10/26/07, Harold Aling h.aling@home.nl wrote:
Doen anyone else have an opinion about this? Or seen something like this in action?
Scribes has both of the features described, IIRC.
After trying them out, I don't remember ever finding a reason to use *A*; and *B* seemed helpful half the time, but a nuisance the other half of the time.
Also, Textmate (for Mac OS X) may come with those features too. Never used Textmate though.