First of all, I've absolutely fallen in love with Geany after a few years of using nedit and jedit on gnome, the former was just ugly, and the latter was clunky as all hell (can you guess how I feel about java?). However, there is one problem that is driving me up the wall, and I'm wondering if there is some good reason it has never been addressed: having fuller posix-style regexp matching in find/replace. Particularly, allowing the use of ? to make searches non-greedy. I've gotten so used to using regexp matching in my editor to allow for copying => pasting => quick change to a selection, but have found I have to make much more careful and generally nasty regexps in order to make up for not being able to use the ? non-greedy match. So, my question is: why doesn't Geany allow non-greedy matching, is there any work being done to address this, is there any easy way around it/patch to allow for this functionality, or in general, how do people deal with this minute but massively irritating detail?
Thanks for any input
/ V.K. Ramesh
Vijay Ramesh wrote:
[...] why doesn't Geany allow non-greedy matching, [...]
Most likely because Scintilla doesn't.
[...] how do people deal with this minute but massively irritating detail?
If your copy / paste / transformation actions are largely the same thing over and over, e.g. copy SQL table definition and transform into form-handling code or something, then you can create a script to perform the transformation. I do this with sed scripts, which I hook up as Custom Commands (see Edit -> Format -> Send selection to), but others probably use the Lua plugin. -- Ross McKay, Toronto, NSW Australia "Let the laddie play wi the knife - he'll learn" - The Wee Book of Calvin
On Wed, 11 Jun 2008 14:55:01 -0400 "Vijay Ramesh" vijay.krishna.ramesh@gmail.com wrote:
...
question is: why doesn't Geany allow non-greedy matching, is there any work being done to address this, is there any easy way around it/patch to allow for this functionality
"better search & replace regex support" is on the TODO list. The current regex engine is the default Scintilla one, but it should be possible to switch this out to the same POSIX-compliant regex engine used for Geany's tagmanager. It just needs someone to figure out the details of how to do this (or ask on the Scintilla ML).
Regards, Nick