<div dir="ltr">Hi again,<div><br></div><div>After a *quick* look at your code, some more comments below.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 April 2013 06:04, Pavel Roschin <span dir="ltr"><<a href="mailto:roshin@scriptumplus.ru" target="_blank">roshin@scriptumplus.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
I'm currently working on patch (not plugin) that may improve current<br>
brackets auto-closing. Patch is under construction but I hope for<br>
feedback - may be you are interesting in some on those features in<br>
geany and may be you have some ideas how to do it better.<br>
<br>
Already implemented features. To use it all, enable all brackets<br>
completion in preferences.<br>
<br>
* auto-complete second char for: {, [, (, ", ' as geany does (rewritten<br>
  logic)<br>
* disable brackets auto-completion inside strings and comments<br>
* delete second completed char if you pressed BackSpace<br></blockquote><div><br></div><div style>To be clear, actually deletes *both* the opening and closing, makes more sense.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

* suppress inserting one char twice (if you type "{}" you will get<br>
  "{}", not "{}}")<br>
* wrap selected text into brackets instead of removing selection<br>
  (select text and type "(" or ")" to wrap selection into "()")<br>
* keep selection in cause of wrapping<br>
* for C-like languages wrapping selection into "{}" makes<br>
  auto-indentation (select text and type "{" or "}" - text will be<br>
  wrapped and indented)<br>
* {}-wrapper moves cursor to beginning (before first "{"<br>
* for C-like languages to insert {}-block you do not need to select<br>
  text precisely: geany detects boundaries automatically, just ensure<br>
  that selection covers lines you need to indent (works like TAB<br>
  indentation)<br>
* fix auto-indent inside {} for C-like languages (makes full indent for<br>
  this block)<br>
* auto-close functions ("sin(|" -> "sin(|);") with double-chars<br>
  suppression (for C only)<br></blockquote><div><br></div><div style>Why are you putting a semicolon? that leaves characters to delete when the user is trying to type "if( getc() == 'a'  )return" or "sin(x)+cos(y)".  The assumption that a function call is the end of a statement is a bad one.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Patch itself and planning features you will find on my github:<br>
<a href="https://github.com/scriptum/geany-patches/" target="_blank">https://github.com/scriptum/geany-patches/</a><br>
<br>
I also planning to move all brackets logic from editor_notify to GTK's<br>
key-press-event because of lack of features in editor_notify events. Is<br>
it possible? I tried it and seems that it works fine...<br></blockquote><div><br></div><div style>What do you need that you don't currently have in notify?</div><div style><br></div><div style>Cheers</div><div style>
Lex</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Pavel aka RPG<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
</font></span></blockquote></div><br></div></div></div>