[wingide-users] Replace in selection
support at wingware.com
Mon Aug 8 16:33:09 EDT 2005
> One thing that bothered me in WingIDE is that it is not possible to
> perform replace in the selected test only. This is the most useful
> mode IMO and it's the default in many IDEs. I noticed a thread from
> April 2005 (search/replace revisited...again) that addresses the same
> problem. Well, luckilly WingIDe is scriptable and it turned out that
> is is pretty simple to extend it to support replace in selection.
Thanks! It works as advertised after fixing one typo in the script.
The replace_in_selection function should be:
def replace_in_selection(what, with_what):
"""Replaces 'what' with 'with_what' in the current selection only"""
return text.replace(what, with_what)
app = wingapi.gApplication
editor = app.GetActiveEditor()
We still intend to add this functionality to the builtin search and
More information about the wingide-users