[Geany] find and replace

Nick Treleaven nick.treleaven at xxxxx
Mon Aug 7 10:14:34 UTC 2006


On 04/08/06 17:40:27, John Gabriele wrote:
> On 8/4/06, John Gabriele <jmg3000 at gmail.com> wrote:
>> On 8/4/06, Nick Treleaven <nick.treleaven at btinternet.com> wrote:
>> > On 04/08/06 06:52:51, John Gabriele wrote:
>> > [snip]
>> > >
>> > > With regard to the "Replace control characters", I see that this
>> > > means: if you put one of these 2-character patterns in your  
>> replace
>> > > string (like \t), you'll actually get the control character when  
>> the
>> > > replace happens (instead of the two separate '\' and 't'  
>> characters).
>> > > It may be an error that this option is in the "Find" dialog,  
>> correct?
>> >
>> > No, what if you want to find lines with a certain indentation?  
>> Also it
>> > can be used to find Unicode characters by their code.
>> 
>> Ah. Ok. I was confused because the overloading of the word "replace"
>> (in connection with "find and replace"). In both the "Find" and
>> "Replace" dialogs, it might make it more clear to change this
>> checkboxe's name from "Replace control characters" to "Interpret
>> control characters", since the editor is "interpreting" what you
>> really mean when you type \t or \uXXXX. [snip]
> 
> You know, it just occurs to me now (since I don't think I've ever
> explicitly used unicode) that this feature is probably much more
> widely used for the unicode than for the ascii control chars (the only
> ascii one I can think of that I might come across is \t, and for that
> I always think "regex"). So, the checkbox item could say "Interpret
> unicode" or else maybe the possibly-too-verbose "Interpret unicode and
> control characters".
I use \t quite a lot when I'm replacing. I think just "Interpret  
control characters" is best.
> 
> Hmm... Wait a sec. Have you ever considered using that checkbox
> explicitly and only for unicode interpretation, and leaving the ascii
> control codes only to be specified as escapes in regexes?
But as we already have the control character feature it would be  
overkill to have to use a regex for doing this.
> 
> My guess is that it's conceivable that you might one day either allow
> extended regexes (another checkbox in the Find and Replace dialogs?),
> or maybe even migrate entirely to a different regex engine. Dunno how
> regexes and unicode chars are connected wrt the regex code though...
We use the integrated Scintilla regex engine because it's best for  
searching Scintilla documents - otherwise we'd probably have to read  
the current document into one long string to pass to another regex  
parser.
Find in files uses the external grep tool because it parses files that  
are not necessarily open in Geany.

Regards,
Nick



More information about the Users mailing list