[Geany-devel] Patch adding auto-close brackets, braces and string r1
ioguix at free.fr
ioguix at xxxxx
Tue Dec 9 04:14:08 UTC 2008
Hi,
So I began to use geany enabling the "autoclosed chars". It is usefull,
but sometime anoying...
So I believe we can make it a little bit more smart.
In a first step, when opening a brace (ie. ( { [ ), we could check if no
closing brace already match it before auto-closing it. That what I tried
to do in the attached patch.
In a second step, I think we could try to detect if we are already in a
string before auto-closing quotes. Moreover, if we are indeed in a string
we could auto-secape any quotes putted in. However, I think this
should be configurable.
About these second step, I hadn't too much time to investigate the code,
but:
- is it possible to actually know what is the current applied style ?
- can we really test if we are actually in a in string whatever the
current language style ?
- about the auto-escaping quotes, it would need some mechanism to exactly
know how the current language style is actually escaping them (obviously C
or SQL doesn't escape string in the same way)
Thanks for your next answer and review :)
--
Guillaume (ioguix) de Rorthais
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoclose-chars_smartbrackets_r1.patch
Type: text/x-diff
Size: 1634 bytes
Desc:
URL: <http://lists.geany.org/pipermail/devel/attachments/20081209/341ed4f3/attachment.patch>
More information about the Devel
mailing list