[wingide-users] Brace matching

Wingware Support support at wingware.com
Wed Nov 12 07:51:53 MST 2008

Torsten Marek wrote:
> is there a way to make Wing only match braces immediately left to the
> cursor, and never a brace under the cursor? Currently, the default seems
> to be that first, the editor checks for a brace under the cursor (at
> point, in emacs speak), and only if none is found, it looks to the
> right. 

Assuming you mean the Match Braces feature in the Source menu, there isn't
a way to alter how that works now although you could write a small script
to move the cursor to the right one and then do the brace match.  Also
doing Match Braces twice in a row may get you want you want.

A script would look something like this:

import wingapi
def my_brace_match():
   app = wingapi.gApplication
   ed = app.GetActiveEditor()
   if ed is not None:

You may need to refer to the scripting documentation if you try this:



Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list