[Geany-devel] "Auto-close quotes and brackets" - addition request
ioguix at free.fr
ioguix at xxxxx
Thu Jan 15 04:41:18 UTC 2009
On Mon, 12 Jan 2009, Thomas Martitz wrote:
> Enrico Tröger schrieb:
>> This all seems kind of weird and hard to fix all cases. I'm afraid a
>> sane implementation would cause a painful amount of extra code :(.
>>
>> Regards,
>> Enrico
>
> This feature has been proven to be good in theory, but bad in practice
> anyway. At least for me. It's basically not usable on any language which
> needs some kind of statement terminator, such as C and its ;.
>
> I see how it might be useful for other languages, but you still need to
> move the cursor behind the auto-inserted char to be able to hit enter to
> get to the next line. And I actually don't see a difference in typing "
> or moving the cursor.
There's at least one:
I have a reflex since some years now, that makes me closing immediatly anything I am
opening, quotes, braces etc...It's not even like I was thinking about
that, it really became a reflex now.
Considering that, this patch actually makes me save some keystroke on
arrows. Consider this code print('blah'), I have to type 2 times on left,
2 times on right. With the patch, I just have to move forward 2 times
when I finished typing "blah", never go back.
Considering some other editors got this kind of feature and that at least
one user found this patch useful on the geany ml, I guess some other
people have this same reflexe.
But I just defend the practice here to answer your first sentence, not the
patch itself.
I discovered this feature was more complexe I used to think and believe
the first initial patch is incomplete. So if you guys decide to withdraw
it from the source I will definitly not mind.
As Enrico was pointing out, having a sane implementation of it would need
some more amount of extra code.
So maybe this is the signal to make us consider pushing this in a
plugin if feasable.
Though, I could try fixing the additionnal problems Enrico pointed out.
Actually the only problem I see presently is the one with delete/backspace
after autoclosing...
>
> Best regards, kugel
Regards,
--
Guillaume (ioguix) de Rorthais
More information about the Devel
mailing list